Make it possible to exlude external libs from dot files

Patch from Christian Ehrlicher.
By setting GRAPHVIZ_EXTERNAL_LIBS to TRUE in CMakeGraphVizOptions.cmake
you can now exclude external libraries from the produced dot file.
I.e. then you see only the dependencies within your project.

Alex
This commit is contained in:
Alex Neundorf 2011-02-05 18:43:34 +01:00
parent 00e7ea76e8
commit 5698ad2047
2 changed files with 8 additions and 2 deletions

View File

@ -54,6 +54,7 @@ cmGraphVizWriter::cmGraphVizWriter(const std::vector<cmLocalGenerator*>&
,GenerateForStaticLibs(true)
,GenerateForSharedLibs(true)
,GenerateForModuleLibs(true)
,GenerateForExternals(true)
,LocalGenerators(localGenerators)
,HaveTargetsAndLibs(false)
{
@ -116,6 +117,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
__set_bool_if_set(this->GenerateForStaticLibs, "GRAPHVIZ_STATIC_LIBS");
__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");
cmStdString tmpRegexString;
__set_if_set(tmpRegexString, "GRAPHVIZ_TARGET_IGNORE_REGEX");
@ -321,9 +323,12 @@ void cmGraphVizWriter::CollectTargetsAndLibs()
{
this->HaveTargetsAndLibs = true;
int cnt = this->CollectAllTargets();
if (this->GenerateForExternals)
{
this->CollectAllExternalLibs(cnt);
}
}
}
int cmGraphVizWriter::CollectAllTargets()

View File

@ -67,6 +67,7 @@ protected:
bool GenerateForStaticLibs;
bool GenerateForSharedLibs;
bool GenerateForModuleLibs;
bool GenerateForExternals;
cmsys::RegularExpression TargetIgnoreRegex;