From 2a9f7f96b804ed929c56826c8477895c5924befe Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 13 Feb 2011 22:53:43 +0100 Subject: [PATCH] Also add the SOURCES from add_custom_target() to CodeBlocks projects (#11736) Since CMake 2.6.3 add_custom_target() has a SOURCES option, this was not yet considered in the C::B generator. Also, now GENERATED files are not added to the project. Alex --- Source/cmExtraCodeBlocksGenerator.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index a5650d468f..4f93067c9a 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -416,11 +416,18 @@ void cmExtraCodeBlocksGenerator case cmTarget::STATIC_LIBRARY: case cmTarget::SHARED_LIBRARY: case cmTarget::MODULE_LIBRARY: + case cmTarget::UTILITY: // can have sources since 2.6.3 { const std::vector&sources=ti->second.GetSourceFiles(); for (std::vector::const_iterator si=sources.begin(); si!=sources.end(); si++) { + // don't add source files which have the GENERATED property set: + if ((*si)->GetPropertyAsBool("GENERATED")) + { + continue; + } + // check whether it is a C/C++ implementation file bool isCFile = false; if ((*si)->GetLanguage() && (*(*si)->GetLanguage() == 'C'))