forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;}))
|
if (!Utils::contains(allLanguages, [&tcd](const Id& language) {return language == tcd.language;}))
|
||||||
continue;
|
continue;
|
||||||
ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language);
|
ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language);
|
||||||
if (!tc || tc->compilerCommand() != tcd.compilerPath)
|
if (!tc || tc->compilerCommand().canonicalPath() != tcd.compilerPath.canonicalPath())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user