[CMake] CMake rebuilding too much

Bill Hoffman bill.hoffman at kitware.com
Thu Oct 7 08:46:25 EDT 2010


On 10/7/2010 8:21 AM, Thomas Sondergaard wrote:
> 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.
>

You are going to have to give more information or a small example that 
shows the problem.  It should not be doing that.  You could try running 
make -d to figure out why make is thinking it needs to do that.

-Bill




More information about the CMake mailing list