diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-09-10 17:44:02 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-09-10 17:44:02 (GMT) |
commit | 10f39d8c802e23b5b6b0f249f5dd8b36cbcb24b5 (patch) | |
tree | 03b276bec55a226ef5a8810d138d203daaf7abc2 /Source | |
parent | c57fb18920be6b17e82eca3399df083b811ebe13 (diff) | |
download | CMake-10f39d8c802e23b5b6b0f249f5dd8b36cbcb24b5.zip CMake-10f39d8c802e23b5b6b0f249f5dd8b36cbcb24b5.tar.gz CMake-10f39d8c802e23b5b6b0f249f5dd8b36cbcb24b5.tar.bz2 |
As in the Eclipse generator: don't insert the edit_cache target if it is ccmake, since this doesn't work in the output tab of the IDE
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index bd73ca6..203e206 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -338,14 +338,31 @@ void cmExtraCodeBlocksGenerator switch(ti->second.GetType()) { case cmTarget::GLOBAL_TARGET: + { + bool insertTarget = false; // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (strcmp(makefile->GetStartOutputDirectory(), makefile->GetHomeOutputDirectory())==0) { + insertTarget = true; + // only add the "edit_cache" target if it's not ccmake, because + // this will not work within the IDE + if (ti->first == "edit_cache") + { + if (strstr(makefile->GetRequiredDefinition + ("CMAKE_EDIT_COMMAND"), "ccmake")!=NULL) + { + insertTarget = false; + } + } + } + if (insertTarget) + { this->AppendTarget(fout, ti->first.c_str(), 0, - make.c_str(), makefile, compiler.c_str()); + make.c_str(), makefile, compiler.c_str()); } + } break; case cmTarget::UTILITY: // Add all utility targets, except the Nightly/Continuous/ |