diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-12-07 23:41:56 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-12-19 21:25:28 +0000 |
commit | a251b22f360321009eb99bd85bd570f2e9830ee7 (patch) | |
tree | fd0f3e124b7816f5f7f5113aa6fccd9442da3c3b /share/qbs/modules/cpp/GenericGCC.qbs | |
parent | 5b9da6dc85c55e3a76611c3ac78c1015119c2ac2 (diff) |
Move the GCC-like compiler binary probe into a dedicated Probe type
This allows the toolchain prefix to be extracted from the probe itself,
which is preparation for refactoring which determines the prefix
automatically if it is left unspecified.
Right now it's obviously always going to be empty string,
or equal to _toolchainPrefix. A subsequent commit will make use of it.
Change-Id: I0f44c4a9d401e75ba48f3e499a23940954a8b619
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 7773e3d5d..37fbaf263 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -44,10 +44,11 @@ CppModule { condition: qbs.toolchain && qbs.toolchain.contains("gcc") priority: -100 - Probes.BinaryProbe { + Probes.GccBinaryProbe { id: compilerPathProbe condition: !toolchainInstallPath && !_skipAllChecks - names: [toolchainPrefix ? toolchainPrefix + compilerName : compilerName] + _compilerName: compilerName + _toolchainPrefix: toolchainPrefix } // Find the version as early as possible in case other things depend on it, @@ -126,7 +127,9 @@ CppModule { property string targetSystem: "unknown" property string targetAbi: "unknown" - property string toolchainPrefix + property string toolchainPrefix: compilerPathProbe.found + ? compilerPathProbe.tcPrefix + : undefined property string toolchainInstallPath: compilerPathProbe.found ? compilerPathProbe.path : undefined property string binutilsPath: binutilsProbe.found ? binutilsProbe.path : toolchainInstallPath |