MantisBT - CMake
View Issue Details
0013809CMakeCMakepublic2012-12-21 09:042016-06-10 14:31
Vassil Vassilev 
Kitware Robot 
normalfeaturealways
closedmoved 
trunkOS X10.4.10
 
 
0013809: add_dependencies and --graphviz
Hi,
  I am using cmake in the context of C# and I don't use add_library or add_executable but I have my own functions that do that trick. I resolve the dependencies between the libraries (since have my home-grown csharp_add_library) using add_dependencies.
  Using that however doesn't allow me to print the dependencies between the targets, which is something IMO natural to expect.
  Am I doing something wrong in general or somebody just has to teach cmGraphVizWriter to react on cmTarget::UTILITY? If that is the case I can propose the attached patch.
Cheers,
Vassil
PS1: Note that I am newbie (I've started using cmake 3 days ago).
PS2: I had hard time building cmake sources in debug mode. Why there is no ./bootstrap --enable-debug switch?
1. add_custom_target(... libA ...)
2. add_custom_target(... libB ...)
3. add_dependencies(libA libB)
4. cmake --graphviz=file.dot path_to_some_source
No tags attached.
related to 0015636closed Kitware Robot alias libraries and and --graphviz 
diff cmGraphVizWriterPlusUtility.diff (494) 2012-12-21 09:04
https://public.kitware.com/Bug/file/4602/cmGraphVizWriterPlusUtility.diff
patch 0001-Update-a-wrong-comment.-It-was-maybe-correct-a-long-.patch (1,207) 2015-06-23 19:03
https://public.kitware.com/Bug/file/5479/0001-Update-a-wrong-comment.-It-was-maybe-correct-a-long-.patch
patch 0001-Update-documentation-of-cmTarget-AddUtility.patch (1,152) 2015-06-23 19:04
https://public.kitware.com/Bug/file/5480/0001-Update-documentation-of-cmTarget-AddUtility.patch
patch 0002-graphviz-Enable-support-for-utility-dependencies-and.patch (7,626) 2015-06-23 19:05
https://public.kitware.com/Bug/file/5481/0002-graphviz-Enable-support-for-utility-dependencies-and.patch
Issue History
2012-12-21 09:04Vassil VassilevNew Issue
2012-12-21 09:04Vassil VassilevFile Added: cmGraphVizWriterPlusUtility.diff
2015-06-23 19:03Andreas HartmetzFile Added: 0001-Update-a-wrong-comment.-It-was-maybe-correct-a-long-.patch
2015-06-23 19:04Andreas HartmetzFile Added: 0001-Update-documentation-of-cmTarget-AddUtility.patch
2015-06-23 19:05Andreas HartmetzFile Added: 0002-graphviz-Enable-support-for-utility-dependencies-and.patch
2015-06-23 19:07Andreas HartmetzNote Added: 0038963
2015-06-25 10:49awinterzNote Added: 0038983
2015-06-30 08:56Brad KingRelationship addedrelated to 0015636
2015-06-30 09:55Brad KingNote Added: 0039002
2015-06-30 18:39Andreas HartmetzNote Added: 0039003
2015-07-02 08:41Brad KingNote Added: 0039012
2016-06-10 14:28Kitware RobotNote Added: 0042179
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0038963)
Andreas Hartmetz   
2015-06-23 19:07   
I also have/had a need to see targets added as dependencies with add_dependency(), in a different context. The attached patch starting with 0002 does it. The first (please disregard the first 0001* upload, it's an older version) updates the AFAICT now very wrong documentation of cmTarget::AddUtility().
(0038983)
awinterz   
2015-06-25 10:49   
I'm also interested in the 0002 patch. any news on this one?
(0039002)
Brad King   
2015-06-30 09:55   
Re 0013809:0038963: Thanks for working on a patch. Please read CONTRIBUTING.rst for the preferred contribution path. Here are some comments on "0002-graphviz-Enable-support-for-utility-dependencies-and.patch".

The name "utility target" is mostly used internally. Public-facing documentation, commands, and options generally refers to a "custom target". Please rename GRAPHVIZ_UTILITY_TARGETS to GRAPHVIZ_CUSTOM_TARGETS.

Rather than documenting the possible inclusion of "internal cmake targets" we should teach the implementation to exclude them automatically. The dependency graph should not depend on which CMake generator is used, but rather only on the project-defined targets.
(0039003)
Andreas Hartmetz   
2015-06-30 18:39   
There seems to be no particular property in internal targets except the name (there are two special names). Do you prefer a filter by name or a new property? My own opinion ist that if you're debugging dependencies, you might want to see all of them. But I don't care that much.
About the contribution guidelines, what I'm doing wrong is not posting patches to the mailing list, right? I already have enough mailing list subscriptions and I'm trying to avoid any new ones if at all possible... and in most projects posts from non-subscribers will rot in moderation forever.
(0039012)
Brad King   
2015-07-02 08:41   
Re 0013809:0039003: Just to make sure we're talking about the same special targets, what are the "two special names" to which you refer?

FYI, on mailman mailing lists you can set the "nomail" option after subscribing to be allowed to post but never receive mail from the list when not explicitly Cc-ed.
(0042179)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.