MantisBT - CMake
View Issue Details
0014544CMake(No Category)public2013-11-04 05:322014-06-02 08:37
Mathieu Malaterre 
Brad King 
normalminorhave not tried
closedfixed 
 
CMake 3.0CMake 3.0 
0014544: Remove edit_cache target from ninja output
Full thread is at:
http://bugs.debian.org/712241 [^]

in summary:

$ ninja edit_cache

does not do anything. So please remove the non-working edit_cache target from ninja output.
No tags attached.
Issue History
2013-11-04 05:32Mathieu MalaterreNew Issue
2013-11-04 06:41Peter KuemmelAssigned To => Peter Kuemmel
2013-11-04 06:42Peter KuemmelStatusnew => assigned
2013-11-04 06:42Peter KuemmelNote Added: 0034341
2013-11-04 06:42Peter KuemmelStatusassigned => resolved
2013-11-04 06:42Peter KuemmelFixed in Version => CMake 3.0
2013-11-04 06:42Peter KuemmelResolutionopen => fixed
2013-11-04 09:32Brad KingNote Added: 0034348
2013-11-04 09:32Brad KingStatusresolved => assigned
2013-11-04 09:32Brad KingResolutionfixed => open
2013-11-04 09:32Brad KingFixed in VersionCMake 3.0 =>
2013-11-04 09:32Brad KingTarget Version => CMake 3.0
2013-11-05 05:35Peter KuemmelNote Added: 0034386
2013-11-05 08:01Brad KingNote Added: 0034388
2013-11-05 08:02Brad KingNote Edited: 0034388bug_revision_view_page.php?bugnote_id=34388#r1308
2013-11-05 11:49Peter KuemmelNote Added: 0034396
2013-11-05 12:42Brad KingNote Added: 0034398
2013-11-05 13:02Peter KuemmelNote Added: 0034399
2013-11-05 13:06Brad KingNote Added: 0034400
2013-11-05 13:20Peter KuemmelNote Added: 0034401
2013-11-18 08:24Brad KingNote Added: 0034456
2013-11-18 08:29Brad KingAssigned ToPeter Kuemmel => Brad King
2013-11-18 08:29Brad KingStatusassigned => resolved
2013-11-18 08:29Brad KingResolutionopen => fixed
2013-11-18 08:29Brad KingFixed in Version => CMake 3.0
2014-06-02 08:37Robert MaynardNote Added: 0036013
2014-06-02 08:37Robert MaynardStatusresolved => closed

Notes
(0034341)
Peter Kuemmel   
2013-11-04 06:42   
cmake-gui (the Qt GUI) is called instead.
(0034348)
Brad King   
2013-11-04 09:32   
I see this commit proposed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dc41c18 [^]

but that makes changes that affect generators other than Ninja. In particular:

- editCacheTargetName, "Running CMake cache editor...",
+ editCacheTargetName, "Running cmake-gui ...",

The reason the generic "CMake cache editor" description is given is because it may be ccmake if cmake-gui was not built.

Also, this hunk:

+ set(CMAKE_EDIT_COMMAND cmake-gui CACHE STRING "use cmake-gui for target edit_cache" FORCE)

while in a Ninja-specific branch is better implemented in C++ code, perhaps with help from a virtual function override in cmGlobalNinjaGenerator.
(0034386)
Peter Kuemmel   
2013-11-05 05:35   
I've reverted, changing editCacheTargetName in a non-ninja file was by accident, it's clear that ccmake is the default, somehow I've overseen that is is a general file.

I always wonder what's better: changing the cmake or the C++ file. Is there a rule?
(0034388)
Brad King   
2013-11-05 08:01   
(edited on: 2013-11-05 08:02)
Re 0014544:0034386: It is not always clear whether something is better in module code or in C++ code, but in this case CMAKE_EDIT_COMMAND is managed exclusively by C++ code currently so this should remain to be the case.

(0034396)
Peter Kuemmel   
2013-11-05 11:49   
Next try:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a39685fa6a986eae86ca9868e44cbc38da3cddf [^]
(0034398)
Brad King   
2013-11-05 12:42   
Re 0014544:0034396: I dug a bit deeper here. The value of CMAKE_EDIT_COMMAND is set here:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmake.cxx;hb=v2.8.12#l1014 [^]

and is forced by ccmake or cmake-gui to point to itself. That way the edit_cache target always matches the most recent dialog used on the tree. However, for Ninja we cannot honor ccmake, so the Ninja generator could simply ignore CMAKE_EDIT_COMMAND altogether and always use cmake-gui if it exists.
(0034399)
Peter Kuemmel   
2013-11-05 13:02   
Yes, I also read this comment, but maybe someone has defined CMAKE_EDIT_COMMAND by the command line. I just used the most conservative version, but I have no problem with removing the def reading, so decide, your choice ;)
(0034400)
Brad King   
2013-11-05 13:06   
Re 0014544:0034399: How does 0a39685f change anything by default? The CMAKE_EDIT_COMMAND will still be set to ccmake first unless one uses cmake-gui to create the build tree, and then GetEditCacheCommand will still use the value. Also, the fallback assumes "cmake-gui" is in the PATH without checking if it was even built with the current version of CMake.
(0034401)
Peter Kuemmel   
2013-11-05 13:20   
0a39685f returns the value of CMAKE_EDIT_COMMAND regardless where it comes from. But when it is overwritten somewhere else, it makes no sense to read (don't now if, and also don't care, all this ping-pong from C++ to cmake, command-line, defaults, defines in same shipped cmake files, ...). So I will just set cmake-gui.
(0034456)
Brad King   
2013-11-18 08:24   
After some internal refactoring to simplify lookup of CMake executable locations, I then refactored selection of the edit_cache dialog across all generators:

 Refactor tool selection for edit_cache
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=684063c0 [^]

Now it always uses cmake-gui for Ninja and for Makefile generators when an "extra" generator for an IDE is in use that also won't have a terminal.
(0036013)
Robert Maynard   
2014-06-02 08:37   
Closing resolved issues that have not been updated in more than 4 months.