CMakePM: Better error message for no CMake present case

Currently if no CMake has been registered and a CMake project has been
openend the user will get the error:
"CMake version  is unsupported. Update to version 3.14 (with file-api)
or later."

With this patch the user will get the error:
"The kit needs to define a CMake tool to parse this project."

Change-Id: I555884fff1eac321052998d1ef7970a49b2f44af
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2022-06-28 16:08:09 +02:00
parent bbf16bba37
commit 175a61ad1b
2 changed files with 7 additions and 6 deletions

View File

@@ -261,7 +261,7 @@ Tasks CMakeKitAspect::validate(const Kit *k) const
{
Tasks result;
CMakeTool *tool = CMakeKitAspect::cmakeTool(k);
if (tool) {
if (tool && tool->isValid()) {
CMakeTool::Version version = tool->version();
if (version.major < 3 || (version.major == 3 && version.minor < 14)) {
result << BuildSystemTask(Task::Warning, msgUnsupportedVersion(version.fullVersion));