forked from woboq/verdigris
-
Notifications
You must be signed in to change notification settings - Fork 1
/
verdigris.qbs
84 lines (74 loc) · 2.76 KB
/
verdigris.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
74
75
76
77
78
79
80
81
82
83
84
import qbs
Project {
name: "Verdigris"
// use `qbs build project.objlibrary_support:true` if qbs is patched (needed for W_QML_ELEMENT support)
property bool objlibrary_support: false
references: [
"tutorial",
"tests",
"benchmarks",
"tools",
]
qbsSearchPaths: "qbs/"
AutotestRunner {}
Product {
name: "Verdigris"
Depends { name: "cpp" }
Depends { name: "Qt.core" }
Qt.core.enableMoc: false
cpp.cxxLanguageVersion: "c++20"
cpp.includePaths: ['src']
files: [
"src/wobjectcpp.h",
"src/wobjectdefs.h",
"src/wobjectimpl.h",
"src/wqmlelement.h",
]
Export {
Depends { name: "cpp" }
Depends { name: "Qt.core" }
cpp.cxxLanguageVersion: "c++20"
cpp.includePaths: ['src']
Properties {
condition: qbs.toolchain.contains('msvc')
cpp.cxxFlags: base.concat(
"/permissive-", "/Zc:__cplusplus", "/Zc:externConstexpr", "/Zc:inline", "/Zc:preprocessor", "/Zc:throwingNew", // best C++ compatibility
"/diagnostics:caret" // better errors
)
}
Properties {
condition: qbs.toolchain.contains('clang')
cpp.cxxFlags: base.concat(
"--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 extension
)
// note: use qbs build parameters if you need this!
// cpp.cxxStandardLibrary: "libc++"
// cpp.staticLibraries: ["c++", "c++abi"]
}
Properties {
condition: qbs.toolchain.contains('gcc')
cpp.cxxFlags: base.concat(
"--pedantic", // best C++ compatibility
"-Wall", "-Wextra", "-Wno-noexcept-type", "-Wno-address", // enable more warnings
"-ftemplate-backtrace-limit=0" // do not cut template backtraces
)
}
}
}
Product {
name: "[Extra Files]"
files: [
".github/workflows/clang.yml",
".github/workflows/gcc.yml",
".github/workflows/windows.yml",
"ChangeLog",
"LICENSE.LGPLv3",
"README.md",
"qbs/modules/wqmlelement/metatypes/metatypes.qbs",
"qbs/modules/wqmlelement/objlibrary/objlibrary.qbs",
]
}
}