diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-12-11 16:41:46 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2020-12-11 16:17:30 +0000 |
commit | 4ae5516453e86b64326e61b14603ed1508aeb319 (patch) | |
tree | 5b582a0f3f562a16b579aab2d1e90bf0e4192345 | |
parent | 20a3eae86f26ac10f4d1f5b3dca98d950e70cd51 (diff) |
CMakeProjectManager: Use canonical paths for compiler match import
On Linux (Ubuntu 20.04) Qt Creator would use /usr/bin/g++ as
compiler for C++. CMake would pick /usr/bin/c++ as C++ compiler.
Both of them are symlinks to /usr/bin/x86_64-linux-gnu-g++-9
There is no need to create imported kits for something which
is the same compiler.
Fixes: QTCREATORBUG-25069
Change-Id: I90e0f7b1977ace3f7995ce09f4b3fcfa64d02b72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 916df2cd88..123d1aee73 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -324,7 +324,7 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const if (!Utils::contains(allLanguages, [&tcd](const Id& language) {return language == tcd.language;})) continue; ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language); - if (!tc || tc->compilerCommand() != tcd.compilerPath) + if (!tc || tc->compilerCommand().canonicalPath() != tcd.compilerPath.canonicalPath()) return false; } |