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('.');