[Cmake-commits] CMake branch, next, updated. v2.8.12.2-7560-ged0a42d
Brad King
brad.king at kitware.com
Mon Feb 10 10:30:47 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ed0a42d431923605306e5beb1514fc11cf048fb4 (commit)
via 18bef4cd66e62b0cb167767f121e54161749c2f8 (commit)
from 0d2b20bc56bda9ef979b057c137c24aa75381915 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed0a42d431923605306e5beb1514fc11cf048fb4
commit ed0a42d431923605306e5beb1514fc11cf048fb4
Merge: 0d2b20b 18bef4c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 10 10:30:46 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 10 10:30:46 2014 -0500
Merge topic 'graphviz-one-file' into next
18bef4cd graphviz: allow to disable per target graphs (#14746)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18bef4cd66e62b0cb167767f121e54161749c2f8
commit 18bef4cd66e62b0cb167767f121e54161749c2f8
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Sun Feb 9 22:58:44 2014 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 10 10:30:50 2014 -0500
graphviz: allow to disable per target graphs (#14746)
In CMakeGraphVizOptions.cmake, allow the options GRAPHVIZ_GENERATE_PER_TARGET
and GRAPHVIZ_GENERATE_DEPENDERS to enable the generation of per target graphs
and subgraphs respectively. Both options are TRUE per default to maintain
current behavior.
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/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;
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeGraphVizOptions.cmake | 14 ++++++++++++++
Source/cmGraphVizWriter.cxx | 14 ++++++++++++++
Source/cmGraphVizWriter.h | 2 ++
3 files changed, 30 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list