[CMake] CMake rebuilding too much

Thomas Sondergaard ts at medical-insight.com
Thu Oct 7 08:21:53 EDT 2010


I've got a reasonably big project with 30+ shared libraries and 70+ 
executables all in one cmake-based project. Today I changed one line in 
a CMakeLists.txt in a sub-directory to link boost program_options in one 
particular executable, and it caused cmake to decide that it needed to 
recompile everything. Why does it do that? Is there a way that I can 
have cmake tell me the reason?

This is the rather innocuous change that caused CMake to rebuild a lot 
more than 'srscrubber'.

< target_link_libraries(srscrubber camutility)
 > target_link_libraries(srscrubber camutility 
${Boost_PROGRAM_OPTIONS_LIBRARY})

I'm using cmake version 2.6-patch 4 on centos linux 5.5 with the default 
  makefile generator.

Thanks,

Thomas



More information about the CMake mailing list