MantisBT - CMake
View Issue Details
0011927CMakeModulespublic2011-03-04 10:122012-04-02 10:10
David Cole 
David Cole 
normalminorhave not tried
closedfixed 
Visual Studio 10Windows
CMake 2.8.4 
CMake 2.8.5CMake 2.8.5 
0011927: ExternalProject: git clone step always runs when using "Visual Studio 10" generator
As reported on the CMake mailing list, the git clone step always runs again on 2nd and later builds, even though the 1st build was completely successful.

This is really annoying, as it always leads to full rebuilds, because the git clone code blows away the source tree first, and does a fresh clone when it runs...

Note that this only happens with Visual Studio 10, and is not a problem with VS9 and earlier.
# CMakeLists.txt:
# ==========================================================================
cmake_minimum_required(VERSION 2.8.4)
project(SAF-ext)
include(ExternalProject)
EXTERNALPROJECT_ADD(
  SAF-ext
  GIT_REPOSITORY "git://github.com/dlrdave/SmallAndFast.git" [^]
  GIT_TAG "5e98e304a464946dd34cb4c53eb3dd1fd348781b"
  CMAKE_ARGS
    -DSAF_INTENTIONAL_COMPILE_ERROR:BOOL=OFF
  INSTALL_COMMAND ""
  UPDATE_COMMAND ""
  )

# Save these steps to repro as a CMakeLists.txt file
# (1) Run this:
# mkdir b1
# cd b1
# cmake -G "Visual Studio 10" ..
# (2) Open solution file in Visual Studio 10
# (3) Build -- allow to finish all the way
# (4) Build again
#
# Expected:
# 2nd build should build nothing as everything is up to date
#
# Actual:
# 2nd build builds everything again, starting with the mkdir steps,
# and continuing on down through git clone and all the rest...
No tags attached.
has duplicate 0012407closed David Cole CMake doesn't generate .rule files 
has duplicate 0012302closed David Cole Unable to use CMAKE_CFG_INTDIR in the OUTPUT of a CUSTOM_COMMAND 
Issue History
2011-03-04 10:12David ColeNew Issue
2011-03-04 10:12David ColeStatusnew => assigned
2011-03-04 10:12David ColeAssigned To => David Cole
2011-03-04 10:13David ColeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=231#r231
2011-03-04 10:14David ColeDescription Updatedbug_revision_view_page.php?rev_id=233#r233
2011-03-04 10:16David ColeNote Added: 0025669
2011-06-07 09:06Bill HoffmanNote Added: 0026738
2011-06-07 11:30Bill HoffmanStatusassigned => resolved
2011-06-07 11:30Bill HoffmanResolutionopen => fixed
2011-06-17 18:35David ColeFixed in Version => CMake 2.8.5
2011-08-17 11:32David ColeRelationship addedhas duplicate 0012407
2011-08-17 11:34David ColeNote Added: 0027219
2011-08-19 14:43David ColeRelationship addedhas duplicate 0012302
2012-04-02 10:10David ColeNote Added: 0029044
2012-04-02 10:10David ColeStatusresolved => closed

Notes
(0025669)
David Cole   
2011-03-04 10:16   
Reference thread on the CMake mailing list:
http://www.cmake.org/pipermail/cmake/2011-March/043204.html [^]
(0026738)
Bill Hoffman   
2011-06-07 09:06   
I have a fix for this checked in.

$ ssh git@cmake.org stage cmake merge -b next fix_vs10_custom_command_rulefiles
Fetching upstream next
Merge topic 'fix_vs10_custom_command_rulefiles' into next

9d406cd Fix for bug 0011927, external project git clone step always runs vs10.

Pushing upstream next
To git@cmake.org:cmake.git
(0027219)
David Cole   
2011-08-17 11:34   
The fix:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d406cd [^]
(0029044)
David Cole   
2012-04-02 10:10   
Closing resolved issues that have not been updated in more than 4 months.