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