[CMake] VS projects are rebuilt even if they don't change

Eric Noulard eric.noulard at gmail.com
Sat Jan 17 07:11:26 EST 2009


2009/1/17 James Bigler <jamesbigler at gmail.com>:
> I started out with this CMakeLists.txt file:
>
> project(rebuild)
> cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
> add_executable(test test.cpp)
>
> I then built and ran the project without problems.
>
> I then added a comment to the file,

Which file?

test.cpp or CMakeLists.txt?

modifying test.cpp shouldn't trigger CMake launch whereas
changing CMakeLists.txt should.

>  and when I built from VS, CMake
> reconfigured and the VS plugin asked if I wanted to reload 1 or more .sln or
> .vcproj files.
>
> It turns out it is the sln project file.
>
> Shouldn't CMake be using copy_if_different for these sorts of things?  I
> understand that it may want to regenerate the project and solution files if
> you configure, but only actually changing those files when they differ would
> prevent a lot of reloading for some of my projects that compute dependencies
> dynamically.

Again which *files* ?
>
> I've noticed this more with the latest release candidate 2.6.3R8, using VS
> 2008 on WinXP64.

Which means 2.6.[012] do not exhibit the same behavior for the same project?


-- 
Erk


More information about the CMake mailing list