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
This commit is contained in:
Alex Neundorf 2011-02-13 22:53:43 +01:00
parent d26ef5c118
commit 2a9f7f96b8
1 changed files with 7 additions and 0 deletions

View File

@ -416,11 +416,18 @@ void cmExtraCodeBlocksGenerator
case cmTarget::STATIC_LIBRARY: case cmTarget::STATIC_LIBRARY:
case cmTarget::SHARED_LIBRARY: case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY: case cmTarget::MODULE_LIBRARY:
case cmTarget::UTILITY: // can have sources since 2.6.3
{ {
const std::vector<cmSourceFile*>&sources=ti->second.GetSourceFiles(); const std::vector<cmSourceFile*>&sources=ti->second.GetSourceFiles();
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin(); for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++) 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 // check whether it is a C/C++ implementation file
bool isCFile = false; bool isCFile = false;
if ((*si)->GetLanguage() && (*(*si)->GetLanguage() == 'C')) if ((*si)->GetLanguage() && (*(*si)->GetLanguage() == 'C'))