summaryrefslogtreecommitdiff
path: root/share/qbs/modules/cpp/windows-msvc.qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-03-09 17:21:41 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-03-13 19:19:23 +0000
commit2a6ddd8ab3894763dac1cb779e018c57ccf9eacb (patch)
tree4ac7081937089fcb0ac5b2e5051d6357ccf40170 /share/qbs/modules/cpp/windows-msvc.qbs
parentd15c50751ed660327408d50283b5709ad9b6c10e (diff)
downloadqbs-2a6ddd8ab3894763dac1cb779e018c57ccf9eacb.tar.gz
Let toolchains configure themselves if the binary is in the PATH
This will allow us to build without a profile. Change-Id: Ie1bfed8590c876342668fc359b0bd49e35a3a0d2 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/windows-msvc.qbs')
-rw-r--r--share/qbs/modules/cpp/windows-msvc.qbs9
1 files changed, 8 insertions, 1 deletions
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs
index 134de44b3..00df214f8 100644
--- a/share/qbs/modules/cpp/windows-msvc.qbs
+++ b/share/qbs/modules/cpp/windows-msvc.qbs
@@ -45,6 +45,12 @@ CppModule {
id: module
+ Probes.BinaryProbe {
+ id: compilerPathProbe
+ condition: !toolchainInstallPath
+ names: ["cl"]
+ }
+
Probes.MsvcProbe {
id: msvcProbe
compilerFilePath: compilerPath
@@ -89,7 +95,8 @@ CppModule {
separateDebugInformation: true
property bool generateManifestFile: true
- property path toolchainInstallPath
+ property string toolchainInstallPath: compilerPathProbe.found ? compilerPathProbe.path
+ : undefined
architecture: qbs.architecture
staticLibraryPrefix: ""
dynamicLibraryPrefix: ""