diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-08-07 00:18:31 -0700 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-07 07:42:10 +0000 |
commit | 7d817cfc01ddd19571ea77ccc1ea2b67dde1f2c7 (patch) | |
tree | 6cecedf71b01d350c94cf3684fa1dd5f75c77ed3 /src/app/qbs-setup-toolchains/probe.cpp | |
parent | bca958c3f55ca73b7cc9cf09317b192a2dec1bc5 (diff) |
Fix standard compiler name warning when using a toolchain prefix.
Change-Id: Ic0a563013157343bdc2e621da38652f23de93086
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/app/qbs-setup-toolchains/probe.cpp')
-rw-r--r-- | src/app/qbs-setup-toolchains/probe.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp index b20ab7229..79478f02b 100644 --- a/src/app/qbs-setup-toolchains/probe.cpp +++ b/src/app/qbs-setup-toolchains/probe.cpp @@ -131,13 +131,6 @@ static void setCommonProperties(Profile &profile, const QString &compilerFilePat { const QFileInfo cfi(compilerFilePath); const QString compilerName = QFileInfo(compilerFilePath).fileName(); - if (!standardCompilerFileNames().contains(compilerName)) - qWarning("%s", qPrintable( - QString::fromLatin1("'%1' is not a standard compiler file name; " - "you must set the cpp.cCompilerName and " - "cpp.cxxCompilerName properties of this profile " - "manually").arg(compilerName))); - if (toolchainTypes.contains(QStringLiteral("mingw"))) profile.setValue(QStringLiteral("qbs.targetOS"), QStringList(QStringLiteral("windows"))); @@ -150,6 +143,14 @@ static void setCommonProperties(Profile &profile, const QString &compilerFilePat profile.setValue(QLatin1String("qbs.toolchain"), toolchainTypes); profile.setValue(QLatin1String("qbs.architecture"), canonicalArchitecture(architecture)); setCompilerVersion(compilerFilePath, toolchainTypes, profile); + + const QString suffix = compilerName.right(compilerName.size() - prefix.size()); + if (!standardCompilerFileNames().contains(suffix)) + qWarning("%s", qPrintable( + QString::fromLatin1("'%1' is not a standard compiler file name; " + "you must set the cpp.cCompilerName and " + "cpp.cxxCompilerName properties of this profile " + "manually").arg(compilerName))); } class ToolPathSetup |