forked from basicpp17/basicpp17
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasiC++17.qbs
61 lines (54 loc) · 1.8 KB
/
BasiC++17.qbs
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
import qbs
Project {
name: "Basic C++17"
references: [
"thirdparty",
"src/meta17.lib",
"src/tuple17.lib",
"src/strong17.lib",
"src/partial17.lib",
"src/variant17.lib",
]
AutotestRunner {}
// note: if do not use this .qbs project you need a similar setup
Product {
name: "cpp17"
Export {
Depends { name: "cpp" }
cpp.cxxLanguageVersion: "c++17"
cpp.treatWarningsAsErrors: true
Properties {
condition: qbs.toolchain.contains('msvc')
cpp.cxxFlags: [
"/permissive-", "/Zc:__cplusplus", // best C++ compatibility
"/diagnostics:caret", // better errors
"/wd4068", // ignore unknown pragmas
"/D_ENABLE_EXTENDED_ALIGNED_STORAGE", // use real alignments
]
}
Properties {
condition: qbs.toolchain.contains('clang')
cpp.cxxFlags: [
"--pedantic", // best C++ compatibility
"-Wall", "-Wextra", // enable more warnings
"-ftemplate-backtrace-limit=0", // do not cut template backtraces
"-Wno-gnu-zero-variadic-macro-arguments" // accept this extensions for opaque strong types
]
cpp.cxxStandardLibrary: "libc++"
cpp.staticLibraries: ["c++", "c++abi"]
}
}
}
Product {
name: "[Extra Files]"
files: [
".clang-format",
".clang-tidy",
".editorconfig",
".gitignore",
".travis.yml",
"LICENSE",
"Readme.md",
]
}
}