diff options
-rw-r--r-- | Modules/CMakeGraphVizOptions.cmake | 14 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 7 | ||||
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 14 | ||||
-rw-r--r-- | Source/cmGraphVizWriter.h | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 3 |
5 files changed, 37 insertions, 3 deletions
diff --git a/Modules/CMakeGraphVizOptions.cmake b/Modules/CMakeGraphVizOptions.cmake index f2b8e59..64c89b9 100644 --- a/Modules/CMakeGraphVizOptions.cmake +++ b/Modules/CMakeGraphVizOptions.cmake @@ -93,6 +93,20 @@ # # * Mandatory : NO # * Default : empty +# +# .. variable:: GRAPHVIZ_GENERATE_PER_TARGET +# +# Set this to FALSE to exclude per target graphs ``foo.dot.<target>``. +# +# * Mandatory : NO +# * Default : TRUE +# +# .. variable:: GRAPHVIZ_GENERATE_DEPENDERS +# +# Set this to FALSE to exclude depender graphs ``foo.dot.<target>.dependers``. +# +# * Mandatory : NO +# * Default : TRUE #============================================================================= # Copyright 2007-2009 Kitware, Inc. diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 33e76cd..74ba9a6 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -841,11 +841,16 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const { // Expand the list. std::vector<std::string> defs; - cmSystemTools::ExpandListArgument(cdefs, defs); + cmGeneratorExpression::Split(cdefs, defs); for(std::vector<std::string>::const_iterator di = defs.begin(); di != defs.end(); ++di) { + if (cmGeneratorExpression::Find(*di) != std::string::npos) + { + continue; + } + std::string::size_type equals = di->find('=', 0); std::string::size_type enddef = di->length(); diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 3a7070e..db964a9 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -53,6 +53,8 @@ cmGraphVizWriter::cmGraphVizWriter(const std::vector<cmLocalGenerator*>& ,GenerateForSharedLibs(true) ,GenerateForModuleLibs(true) ,GenerateForExternals(true) +,GeneratePerTarget(true) +,GenerateDependers(true) ,LocalGenerators(localGenerators) ,HaveTargetsAndLibs(false) { @@ -116,6 +118,8 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GenerateForSharedLibs, "GRAPHVIZ_SHARED_LIBS"); __set_bool_if_set(this->GenerateForModuleLibs, "GRAPHVIZ_MODULE_LIBS"); __set_bool_if_set(this->GenerateForExternals, "GRAPHVIZ_EXTERNAL_LIBS"); + __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); + __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); cmStdString ignoreTargetsRegexes; __set_if_set(ignoreTargetsRegexes, "GRAPHVIZ_IGNORE_TARGETS"); @@ -149,6 +153,11 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, // which other targets depend on it. void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) { + if(this->GenerateDependers == false) + { + return; + } + this->CollectTargetsAndLibs(); for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt = @@ -195,6 +204,11 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) // on which targets it depends. void cmGraphVizWriter::WritePerTargetFiles(const char* fileName) { + if(this->GeneratePerTarget == false) + { + return; + } + this->CollectTargetsAndLibs(); for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt = diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index f784aa0..17b97f8 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -74,6 +74,8 @@ protected: bool GenerateForSharedLibs; bool GenerateForModuleLibs; bool GenerateForExternals; + bool GeneratePerTarget; + bool GenerateDependers; std::vector<cmsys::RegularExpression> TargetsToIgnoreRegex; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 18ba7c8..d440f7c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -317,8 +317,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) // variable only for non-executable targets. This preserves // compatibility with previous CMake versions in which executables // did not support this variable. Projects may still specify the - // property directly. TODO: Make this depend on backwards - // compatibility setting. + // property directly. if(this->TargetTypeValue != cmTarget::EXECUTABLE && this->TargetTypeValue != cmTarget::INTERFACE_LIBRARY) { |