CMake: Better warnings for strange/invalid CMake binaries

Warn when cmake is configured to use a non-canonical path. This might
trigger problems in CMake itself.

Show this warning in the Kit as well as in the CMake options page.

Also complain other issues in the CMake options page.

Task-number: QTCREATORBUG-22583
Change-Id: I841341db8305f9152543487ce9ceeab2eca0b2b9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-05 12:57:01 +02:00
parent 0b493a351e
commit de6faa0f15
4 changed files with 113 additions and 26 deletions

View File

@@ -46,6 +46,7 @@
#include <QComboBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFileInfo>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
@@ -256,6 +257,13 @@ 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;
}