forked from qt-creator/qt-creator
Run CMake via canonical path instead of warning
Running CMake via a non-canonical path (including '..' in the path, or
via a symlink) can result in funny errors.
de6faa0f15 added a warning for that
condition. Unfortunately the auto-detection of CMake can return a path
to a symlink (e.g. for CMake from brew on macOS). Also it is helpful to
use a symlink to e.g. manage different CMake versions.
Instead of warning about the condition, and forcing the user to resolve
it manually, simply run CMake via its canonical path when actually
running it from Qt Creator.
Change-Id: I95623b45c5436a6d61c1419b7aba23e2a73a0650
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -257,13 +257,6 @@ Tasks CMakeKitAspect::validate(const Kit *k) const
|
||||
"version 3.0 or later.").arg(QString::fromUtf8(version.fullVersion)),
|
||||
Utils::FilePath(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
if (!tool->isExecutablePathCanonical()) {
|
||||
result << Task(Task::Warning,
|
||||
CMakeTool::nonCanonicalPathToCMakeExecutableWarningMessage(),
|
||||
Utils::FilePath(),
|
||||
-1,
|
||||
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user