[CMake] ccmake .

Michael Wild themiwi at gmail.com
Fri Aug 14 03:46:25 EDT 2009


I also noticed that ccmake always modifies the cache. But that in  
itself should NOT cause a complete rebuild of your project. On the  
next `make' it should only re-configure and regenerate the build  
system, and then print a list of all targets as Make checks them all,  
but nothing should be compiled or linked.

Is it possible that in your CMake code you unconditionally modify  
(e.g. re-create) a central header file, such as config.h? If you do  
that, Make will think everything else is out-of-date and recompile.  
But if you either use configure_file or add_custom_command, things  
should be fine. file(WRITE ${CMAKE_BINARY_DIR}/config.h ...) would  
cause troubles!

Michael

On 14. Aug, 2009, at 9:20, Dominik Szczerba wrote:

> Tested with cmake 2.6.4 on linux.
> It is the case with all my projects, probably we don't need a test  
> case.
> The mentioned actions simply modify CMakeCache.txt (check with your  
> running projects), while they should not, should they?
>
> Dominik
>
> Eric Noulard wrote:
>> 2009/8/13 Dominik Szczerba <dominik at itis.ethz.ch>:
>>> Once again: I am calling 'ccmake .', 'cmake-gui.' or 'make  
>>> edit_cache' just
>>> to inspect the build settings. I quit with no changes saved.
>>> Then 'make' rebuilds the project, which is an obvious bug or  
>>> *extremely*
>>> unexpected behavior.
>> Which CMake version? Which OS? etc...
>> May be you can give us a reproducable testcase?
>



More information about the CMake mailing list