Browse Source

CodeBlocks: Show generated files in non-utility targets

Since 2.6.3 the UTILITY target may have source files. A defect was filed
that these files are now visible in the source tree. A fix later removed
all generated files from the source tree, regardless of the target type.
You can't even include them by using the SOURCES option. This fix adds
generated files again, except for the UTILITY target which cluttered the
source tree.

Fixes #14272.
Enrico Bedau 9 years ago
parent
commit
afd6cc6b92
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Source/cmExtraCodeBlocksGenerator.cxx

+ 4 - 2
Source/cmExtraCodeBlocksGenerator.cxx

@@ -376,8 +376,10 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
                              makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
           for (std::vector<cmSourceFile*>::const_iterator si = sources.begin();
                si != sources.end(); si++) {
-            // don't add source files which have the GENERATED property set:
-            if ((*si)->GetPropertyAsBool("GENERATED")) {
+            // don't add source files from UTILITY target which have the
+            // GENERATED property set:
+            if (gt->GetType() == cmState::UTILITY &&
+                (*si)->GetPropertyAsBool("GENERATED")) {
               continue;
             }