[CMake] ccmake .

Dominik Szczerba dominik at itis.ethz.ch
Fri Aug 14 08:18:24 EDT 2009


Filed under:

http://public.kitware.com/Bug/view.php?id=9418

Many thanks Eric and Michael.

PS. Indeed, cmake-gui does NOT modify the cache in vein, which is what I 
would expect.

Dominik

Eric Noulard wrote:
> 2009/8/14 Michael Wild <themiwi at gmail.com>:
>> 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.
> 
> Agreed same here.
> CMake 2.6.4 on Linux.
> 
> I should add that on my side ONLY ccmake and make edit_cache do
> unconditionnally modify the cache.
> 
> cmake-gui does NOT do that, Dominik can you confirm that your cmake-gui
> does modify the cache?
> 
> The modification seems to concern, this var:
> 
> //Advanced flag for variable: CMAKE_BUILD_TOOL
> CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1
> 
> "ccmake" and "make edit_cache" do suppress this var unconditionnally
> and rewrite the CMakeCache.txt
> 
>> 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!
> 
> That may be the reason but I think Dominik is right the unconditionnal
> modification
> of the CMakeCache.txt is not an expected behavior and deserve a bug report.
> 
> Dominik would you like to file the bug report?
> http://public.kitware.com/Bug/main_page.php
> 
> In the meantime, I think cmake-gui seems to be more CMakeCache.txt friendly
> 


-- 
d o m i n i k   s z c z e r b a ,   p h d . . . . . . . . . . .
c o m p u t a t i o n a l   l i f e   s c i e n c e   g r o u p
. . . . . . . i t ' i s   r e s e a r c h   f o u n d a t i o n
. . . . . . . . . . . . . . . . . . . . http://www.itis.ethz.ch



More information about the CMake mailing list