View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014544CMake(No Category)public2013-11-04 05:322014-06-02 08:37
ReporterMathieu Malaterre 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014544: Remove edit_cache target from ninja output
DescriptionFull 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.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034341)
Peter Kuemmel (developer)
2013-11-04 06:42

cmake-gui (the Qt GUI) is called instead.
(0034348)
Brad King (manager)
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 (developer)
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 (manager)
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 (developer)
2013-11-05 11:49

Next try:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a39685fa6a986eae86ca9868e44cbc38da3cddf [^]
(0034398)
Brad King (manager)
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 (developer)
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 (manager)
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 (developer)
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 (manager)
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 (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-11-04 05:32 Mathieu Malaterre New Issue
2013-11-04 06:41 Peter Kuemmel Assigned To => Peter Kuemmel
2013-11-04 06:42 Peter Kuemmel Status new => assigned
2013-11-04 06:42 Peter Kuemmel Note Added: 0034341
2013-11-04 06:42 Peter Kuemmel Status assigned => resolved
2013-11-04 06:42 Peter Kuemmel Fixed in Version => CMake 3.0
2013-11-04 06:42 Peter Kuemmel Resolution open => fixed
2013-11-04 09:32 Brad King Note Added: 0034348
2013-11-04 09:32 Brad King Status resolved => assigned
2013-11-04 09:32 Brad King Resolution fixed => open
2013-11-04 09:32 Brad King Fixed in Version CMake 3.0 =>
2013-11-04 09:32 Brad King Target Version => CMake 3.0
2013-11-05 05:35 Peter Kuemmel Note Added: 0034386
2013-11-05 08:01 Brad King Note Added: 0034388
2013-11-05 08:02 Brad King Note Edited: 0034388
2013-11-05 11:49 Peter Kuemmel Note Added: 0034396
2013-11-05 12:42 Brad King Note Added: 0034398
2013-11-05 13:02 Peter Kuemmel Note Added: 0034399
2013-11-05 13:06 Brad King Note Added: 0034400
2013-11-05 13:20 Peter Kuemmel Note Added: 0034401
2013-11-18 08:24 Brad King Note Added: 0034456
2013-11-18 08:29 Brad King Assigned To Peter Kuemmel => Brad King
2013-11-18 08:29 Brad King Status assigned => resolved
2013-11-18 08:29 Brad King Resolution open => fixed
2013-11-18 08:29 Brad King Fixed in Version => CMake 3.0
2014-06-02 08:37 Robert Maynard Note Added: 0036013
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team