MantisBT - CMake
View Issue Details
0015296CMakeCMakepublic2014-12-10 07:022016-06-10 14:31
Ilya 
Kitware Robot 
normalmajoralways
closedmoved 
 
 
0015296: External Project improperly handles updates from VCS
When External Project is configured to get sources from git repo from a branch it improperly handles changes.

When generator is Ninja, it simply ignores changes and do not rebuild.
When generator is UNIX Makefiles it always rebuilds despite whether there were changes or not.

Probably this is also true for other VCS sources.
ninja
Issue History
2014-12-10 07:02IlyaNew Issue
2014-12-10 07:55Daniele E. DomenichelliNote Added: 0037432
2014-12-10 09:38IlyaNote Added: 0037433
2014-12-10 09:38IlyaNote Edited: 0037433bug_revision_view_page.php?bugnote_id=37433#r1634
2015-11-03 16:21Nicholas BradenNote Added: 0039830
2015-11-03 16:22Nicholas BradenTag Attached: ninja
2016-06-10 14:29Kitware RobotNote Added: 0042684
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0037432)
Daniele E. Domenichelli   
2014-12-10 07:55   
ExternalProject has no way to know if one or more files from the external project was updated, therefore the build must run after the update step.
Therefore, in my opinion, the UNIX Makefile generator is correct.

I don't know much about the Ninja generator, but if it doesn't run the build step after the update step, there could be a bug.

Which CMake version are you using?
(0037433)
Ilya   
2014-12-10 09:38   
ExternalProject can check SHA of current and new commit to determine whether any changes were introduced.

(0039830)
Nicholas Braden   
2015-11-03 16:21   
I can reproduce this issue, Windows 10 64bit using CMake 3.3.1 and Ninja 1.6.0.

Ninja only builds external projects the first time. No amount of rerunning it will get it to rebuild external projects that have been updated by git. With Unix Makefiles generator or MinGW Makefiles generator, it works correctly.
(0042684)
Kitware Robot   
2016-06-10 14:29   
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.