My question is still not answered completely:

When should the new variable be added? On startup is not really
possible because it might be the case that your src/binary directory
is not set properly.

So you would agree that it makes sense to do it "on configure" but
only if the cache
is empty? This will not allow to overwrite the variable via parameter
but I guess
that usecase is not very common?

(This is all my opinion, and may be mine alone, and should be discussed on the developer's list to see if it is shared by most other CMake devs, or if somebody objects to it for "backwards compatibility" reasons. I am adding the CMake dev list on the cc line...)

On startup is the only time it does make sense. After that, the user should be in charge, and the command line settings should not be re-applied again after a user makes an edit. You don't need the src/binary directories set properly necessarily in order to add a cache entry to the UI.

ccmake and cmake-gui *should* behave (in *my* opinion) as follows:
- on startup, load the CMakeCache.txt values (if there are any) from the previous run - then apply the -D arguments so that any -D arguments given on the command line overwrite previous cache entries (just like command line cmake does already)
- then put the user in charge and wait for user input

This is, apparently, NOT the way that ccmake behaves today, but I think it should be changed to be like that.

Please chime in, especially if you have a differing opinion.


David C.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to