blob: 24c37951cabe274bdd70cdcf44f9a1e20d004a63 (
plain)
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
|
CppApplication {
name: "app"
files: ["main.cpp"]
Probe {
id: compilerProbe
property stringList toolchain: qbs.toolchain
property string compilerVersion: cpp.compilerVersion
configure: {
var isNewerMsvc;
var isEvenNewerMsvc;
var isOlderMsvc;
var isGcc;
if (toolchain.includes("clang-cl")) {
isEvenNewerMsvc = true;
isNewerMsvc = true;
} else if (toolchain.includes("msvc")) {
if (compilerVersion >= "19.12.25831")
isEvenNewerMsvc = true;
if (compilerVersion >= "18.00.30723")
isNewerMsvc = true;
else
isOlderMsvc = true;
} else {
isGcc = true;
}
console.info("is newer MSVC: " + isNewerMsvc);
console.info("is even newer MSVC: " + isEvenNewerMsvc);
console.info("is older MSVC: " + isOlderMsvc);
console.info("is GCC: " + isGcc);
}
}
}
|