forked from malirod/logger-facade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (67 loc) · 1.61 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apply plugin: "cpp"
def boost_home = System.getenv("BOOST_HOME")
model {
toolChains {
clang(Clang)
gcc(Gcc)
}
binaries {
all {
if (buildType == buildTypes.debug) {
cppCompiler.args "-g"
}
cppCompiler.args "-Wextra"
cppCompiler.args "-std=c++11"
cppCompiler.args "-Werror"
cppCompiler.args "-Wpedantic"
linker.args "-lpthread"
}
}
buildTypes {
debug
release
}
repositories {
libs(PrebuiltLibraries) {
boost_log {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${boost_home}/lib/libboost_log.a")
}
}
boost_thread {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${boost_home}/lib/libboost_thread.a")
}
}
boost_system {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${boost_home}/lib/libboost_system.a")
}
}
}
}
components {
testrunner(NativeExecutableSpec) {
sources {
cpp {
source {
srcDirs = ["thirdparty/gtest",
"src",
"test"
]
include "**/*.cc"
}
exportedHeaders {
srcDirs = ["thirdparty/gtest",
"src",
"${boost_home}/include"
]
}
lib library: "boost_log", linkage: "static"
lib library: "boost_thread", linkage: "static"
lib library: "boost_system", linkage: "static"
}
}
}
}
}