blob: 3e3509e20d0eccf1b233a4c91f09c35bfdc26912 (
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
|
import qbs 1.0
import qbs.Process
Module {
name: 'definition'
Depends { name: 'cpp' }
Probe {
id: node
property string result
configure: {
var cmd;
var args;
if (qbs.targetOS.contains("windows")) {
cmd = "cmd";
args = ["/c", "date", "/t"];
} else {
cmd = 'date';
args = [];
}
var p = new Process();
if (0 === p.exec(cmd, args)) {
found = true;
result = p.readLine();
} else {
found = false;
result = undefined;
}
p.close();
}
}
cpp.defines: node.found ? 'TEXT="Configured at ' + node.result + '"' : undefined
}
|