-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrec_cpp.qbs
73 lines (65 loc) · 2.21 KB
/
rec_cpp.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
62
63
64
65
66
67
68
69
70
71
72
73
import qbs
Project {
name: "Rebuild Experimental Compiler"
// Customizations:
// - enforce debug symbols for debuggig
// modules.cpp.debugInformation:true
references: [
"third_party",
"shared",
"src",
]
AutotestRunner {}
Product {
name: "cpp20"
Export {
Depends { name: "cpp" }
cpp.cxxLanguageVersion: "c++20"
cpp.treatWarningsAsErrors: true
cpp.enableRtti: false
Properties {
condition: qbs.toolchain.contains('msvc')
cpp.cxxFlags: base.concat(
"/permissive-", "/Zc:__cplusplus", "/Zc:inline", // best C++ compatibilty
"/diagnostics:caret", // better error messages
"/W4", // enable all warnings
"/external:anglebrackets", "/external:W0" // ignore warnings from external headers
)
}
Properties {
condition: qbs.toolchain.contains('clang') || qbs.toolchain.contains('gcc')
cpp.cxxFlags: base.concat(
"--pedantic", // best C++ compatibility
"-Wall", "-Wextra", // enable more warnings
"-Wno-missing-braces", // relax bracing rules
"-Wno-invalid-noreturn", // we need type for type checking
"-Wno-gnu-zero-variadic-macro-arguments" // google test uses this
)
}
Properties {
condition: qbs.toolchain.contains('clang')
cpp.cxxStandardLibrary: "libc++"
cpp.staticLibraries: ["c++", "c++abi"]
}
}
}
Product {
name: "[Extra Files]"
files: [
".clang-format",
".clang-tidy",
".editorconfig",
".gitattributes",
".github/workflows/test_runner.yml",
".gitignore",
"Makefile",
"Readme.md",
"docker_clang_check.sh",
"docker_gcc_check.sh",
"docker_qtc_clang.sh",
"docker_qtc_gcc.sh",
"docs/modules.adoc",
"docs/rebuild_API.adoc",
]
}
}