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 <them...@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

_______________________________________________
Powered by www.kitware.com

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

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

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

Reply via email to