MantisBT - CMake
View Issue Details
0009871CMakeCMakepublic2009-11-09 14:312016-06-10 14:31
Kevin Burge 
Bill Hoffman 
normalmajoralways
closedmoved 
CMake-2-8 
 
0009871: running nmake after modifying CMakeLists.txt files causes everything to rebuild
If after configuring and building with cmake + nmake, I modify a CMakeLists.txt file and then:

* run nmake without running cmake again, which causes nmake to call cmake to reconfigure, it blows away all of my custom targets and rebuilds them.

* run cmake THEN nmake, it builds normally.

This tells me that nmake is calling cmake for reconfigure in such a way as it thinks all my targets are out of date. Works fine if I run cmake first (with all the same arguments as when I first ran cmake), and it works fine on other OSes.

Would be happy to help troubleshoot this, if I was directed.

This is 280rc5.
No tags attached.
Issue History
2009-11-09 14:31Kevin BurgeNew Issue
2009-11-09 14:36Bill HoffmanStatusnew => assigned
2009-11-09 14:36Bill HoffmanAssigned To => Bill Hoffman
2009-11-09 14:37Bill HoffmanNote Added: 0018372
2010-01-22 10:30Kevin BurgeNote Added: 0019270
2010-01-22 10:31Kevin BurgeNote Edited: 0019270
2016-06-10 14:27Kitware RobotNote Added: 0041613
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0018372)
Bill Hoffman   
2009-11-09 14:37   
Only think I can figure is you have somehow configured the project to only work with a special command line to CMake. If you could create a minimal but complete project that shows this problem, and attach it to this bug, I might be able to figure it out. BTW, nmake rebuild_cache should re-run CMake the same way as when CMake is re-run due to out of date files.
(0019270)
Kevin Burge   
2010-01-22 10:30   
(edited on: 2010-01-22 10:31)
I've discovered a little bit more about this.

It is the Generate phase that is making all targets rebuild. (It removes my "stamp" files for custom targets, as well as sub projects that build via normal CMake commands).

If I run:

nmake edit_cache

And do configure/generate, it does not cause a rebuild.

If I run:
nmake rebuild_cache

It does not cause a rebuild.

If I run:
nmake cmake_check_build_system

It DOES cause the rebuild.

I forgot to add that I used sysinternal's procmon to determine that it was the Generate phase of cmake_check_build_system that was removing my "stamp" file.

(0041613)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.