[CMake] CMake rebuilding too much
Thomas Sondergaard
ts at medical-insight.com
Tue Oct 12 07:07:43 EDT 2010
On 07-10-2010 14:46, Bill Hoffman wrote:
> 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
>
I found the problem. I had the following in my top-level CMakeLists.txt:
if(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual
-Wno-unknown-pragmas -Werror" CACHE STRING "Flags used by the compiler
during all build types." FORCE)
endif()
I don't know why I had the FORCE in there, but it caused the warning
flags above to be appended again whenever a CMakeLists.txt file was
touched. Removing FORCE fixed it.
Thanks,
Thomas
More information about the CMake
mailing list