From 4c699d518110554f9ca3ff4ab1ad09dc4c089fc1 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 9 Jun 2021 15:48:59 +0200 Subject: [PATCH] CMakePM: Enable extra compilers only for files in the project Qt Creator 4.15 added the "" project node containing all the files in the source directory. Qt Creator for its "find extra compilers" step needs only the files from the project and not all the files in the system. Task-number: QTCREATORBUG-25783 Change-Id: I5d33d5296f67ab3f321c232e5071f32e56d29101 Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 94eeb5032e1..54de9efb68b 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -1142,7 +1142,7 @@ QList CMakeBuildSystem::findExtraCompilers() // Find all files generated by any of the extra compilers, in a rather crude way. Project *p = project(); const FilePaths fileList = p->files([&fileExtensions](const Node *n) { - if (!Project::SourceFiles(n)) + if (!Project::SourceFiles(n) || !n->isEnabled()) // isEnabled excludes nodes from the file system tree return false; const QString fp = n->filePath().toString(); const int pos = fp.lastIndexOf('.');