MantisBT - CMake
View Issue Details
0014756CMakeCMakepublic2014-02-14 14:202016-06-10 14:31
Ben Boeckel 
Kitware Robot 
normalfeaturehave not tried
closedmoved 
CMake 3.1 
 
0014756: RFE: Report changes to cached values
Add a variable to CMake such that it will report when a cached variable's value is different from the default being set. For example:

    set(var dflt CACHE STRING "description")

could output:

    path/to/CMakeLists.txt:42: var 'dflt' -> 'cachedvalue'

and could also, at the end of configure, print out a command line (or initial cache file) to be used to duplicate the build on another machine. I was thinking of 'CMAKE_REPORT_DELTA' as the control variable.

Came up from a gn thread: https://groups.google.com/a/chromium.org/d/msg/gn-dev/la6vwV3x-o4/hkJJ78a7rqwJ [^]
No tags attached.
related to 0014546closed Kitware Robot CACHE variables persist through reruns 
Issue History
2014-02-14 14:20Ben BoeckelNew Issue
2014-02-14 15:34Brad KingRelationship addedrelated to 0014546
2014-02-14 15:38Brad KingNote Added: 0035112
2016-06-10 14:29Kitware RobotNote Added: 0042487
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035112)
Brad King   
2014-02-14 15:38   
Note that in Modules/CMakeGenericSystem.cmake we do:

 if(NOT DEFINED CMAKE_INSTALL_PREFIX)
   set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
 endif()
 ...
   set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "...")
 ...

so that applications can know when they can force a different default for CMAKE_INSTALL_PREFIX without overriding a user setting.

This could be generalized for use with all cache entries. It would be helpful for projects that want to override the default CMAKE_C_FLAGS_DEBUG, for example, without needing to use CMAKE_USER_MAKE_RULES_OVERRIDE and a separate file.

See also discussion in 0014546.
(0042487)
Kitware Robot   
2016-06-10 14:29   
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.