Merge topic 'AddCustomTargetSourcesToCodeBlocksProject'

2a9f7f9 Also add the SOURCES from add_custom_target() to CodeBlocks projects (#11736)
This commit is contained in:
Brad King 2011-02-22 14:32:31 -05:00 committed by CMake Topic Stage
commit 67c542a3cc
1 changed files with 7 additions and 0 deletions

View File

@ -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<cmSourceFile*>&sources=ti->second.GetSourceFiles();
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"))
{
continue;
}
// check whether it is a C/C++ implementation file
bool isCFile = false;
if ((*si)->GetLanguage() && (*(*si)->GetLanguage() == 'C'))