forked from qt-creator/qt-creator
CMakeManager: Avoid one use of Environment::appendExeExtensions()
Use FilePath::refersToExecutableFile() instead. This makes it better re-usable for remote setup. Change-Id: Ic69739b332f036ed791adbbc8092a139b4c83c2d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -65,18 +65,13 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools()
|
||||
path.append("/opt/local/bin");
|
||||
}
|
||||
|
||||
const QStringList execs = env.appendExeExtensions(QLatin1String("cmake"));
|
||||
|
||||
FilePaths suspects;
|
||||
for (const FilePath &base : std::as_const(path)) {
|
||||
if (base.isEmpty())
|
||||
continue;
|
||||
|
||||
for (const QString &exec : execs) {
|
||||
const FilePath suspect = base.resolvePath(exec);
|
||||
if (suspect.isExecutableFile())
|
||||
suspects << suspect;
|
||||
}
|
||||
const FilePath suspect = base / "cmake";
|
||||
if (suspect.refersToExecutableFile(FilePath::WithAnySuffix))
|
||||
suspects << suspect;
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<CMakeTool>> found;
|
||||
|
||||
Reference in New Issue
Block a user