MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0009980 | CMake | CMake | public | 2009-11-30 12:49 | 2016-06-10 14:31 |
Reporter | David Faure | ||||
Assigned To | Bill Hoffman | ||||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0009980: Separate user-specified and cached variables | ||||
Description | cmake is really missing the equivalent of autoconf's config.status: a way to re-run cmake with the same options as initially (plus any options modified by hand in cmake-gui, I suppose). This would be useful for many use cases. Use case 1: going to an old cmake project, and cmake needs to be rerun again for some reason (e.g. Qt is now in a different prefix). If one didn't write down the options he passed cmake, one has to figure them out again. I keep shell scripts around in every project, but that's just manual work that other buildsystems automate -- simply remembering which options were given by the user. The suggestion of "deleting the stuff from the cache that doesn't apply anymore" isn't a solution; in the example of Qt there are countless variables that depend on its location. Use case 2: changing the compiler. See the bug report in the "Additional information" field. | ||||
Steps To Reproduce | |||||
Additional Information | I edited the cache file to change the path to gcc. After doing that, I typed make, and cmake realized I had changed the compiler and re-configured everything, including... losing my install prefix! This is exactly why cmake should differenciate between the options set by the user and the options it found itself. So that it never loses the options set by the user, like the install prefix.... Details below: > cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$KDEDIR . [...] > grep INSTALL_PREFIX CMakeCache.txt CMAKE_INSTALL_PREFIX:PATH=/d/kde/inst/kde4 > grep gcc CMakeCache.txt CMAKE_C_COMPILER:FILEPATH=/usr/lib/icecc/bin/gcc OK, let's change gcc to use ccache: > perl -pi -e 's,/usr/lib/icecc/bin/gcc,/usr/lib/ccache/gcc,' CMakeCache.txt > grep gcc CMakeCache.txt CMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/gcc > make Executing command /d/qt/4/kde-qt-4.6/bin/qmake -query QT_VERSION -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_C_COMPILER= /usr/lib/ccache/gcc [...] > grep INSTALL_PREFIX CMakeCache.txt CMAKE_INSTALL_PREFIX:PATH=/usr/local Whoops, where did my install prefix go??? | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2009-11-30 12:49 | David Faure | New Issue | |||
2010-08-29 10:17 | Kovarththanan Rajaratnam | Severity | major => feature | ||
2010-12-15 09:02 | David Cole | Status | new => assigned | ||
2010-12-15 09:02 | David Cole | Assigned To | => Bill Hoffman | ||
2011-07-06 14:57 | Alex Neundorf | Note Added: 0027013 | |||
2012-05-15 13:05 | David Faure | Note Added: 0029475 | |||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041629 | |||
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|