summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-10-20 21:14:12 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2009-10-20 21:14:12 (GMT)
commit9ab9bb0eceb853edd6621ed2fe8cf221daadabfc (patch)
tree64800b93a4d7310dd9a83606cafb4ad8231f91f9 /Source/cmExtraCodeBlocksGenerator.cxx
parentbc43b0f2a4dcecaaf653bb2d8b2bc13b4245f4d6 (diff)
downloadCMake-9ab9bb0eceb853edd6621ed2fe8cf221daadabfc.zip
CMake-9ab9bb0eceb853edd6621ed2fe8cf221daadabfc.tar.gz
CMake-9ab9bb0eceb853edd6621ed2fe8cf221daadabfc.tar.bz2
make testing the CodeBlocks and Eclipse generators easier by not requiring the CMAKE_EDIT_COMMAND variable
Both generators use the CMAKE_EDIT_COMMAND variable to determine whether they should add the edit_cache target, i.e. they don't add it if it's ccmake, since this does not work inside the output log view of Eclipse/Codeblocks. But instead of requiring the variable to be set they now check it for 0 and handle this appropriately. This should help Dave getting some testing for them :-) Alex
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 3bf8976..4bedea3 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -352,8 +352,13 @@ void cmExtraCodeBlocksGenerator
// this will not work within the IDE
if (ti->first == "edit_cache")
{
- if (strstr(makefile->GetRequiredDefinition
- ("CMAKE_EDIT_COMMAND"), "ccmake")!=NULL)
+ const char* editCommand = makefile->GetDefinition
+ ("CMAKE_EDIT_COMMAND");
+ if (editCommand == 0)
+ {
+ insertTarget = false;
+ }
+ else if (strstr(editCommand, "ccmake")!=NULL)
{
insertTarget = false;
}