[CMake] ExternalProject git update problem

Sascha Zelzer s.zelzer at dkfz-heidelberg.de
Sat Mar 26 11:54:00 EDT 2011


Hi,

we are using the ExternalProject module from CMake 2.8.4 and are 
observing a strange git update problem on Windows 7 when running a CTest 
script (using the new-style ctest_build, etc. commands).

Our ExternalProject_Add call essentially looks like this:

ExternalProject_Add(${proj}
     GIT_REPOSITORY "${PROJ_GIT_REPOSITORY}"
     GIT_TAG "${PROJ_GIT_BRANCH}"
     BINARY_DIR ${PROJ_BINARY_DIR}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
       ${ep_common_args}
       -DBUILD_SHARED_LIBS:BOOL=ON
     DEPENDS
       ${proj_DEPENDENCIES}
     )


In the CTest script, when calling:

set(CTEST_BUILD_TARGET ${proj})
ctest_build(BUILD "${build_dir}" APPEND)

a message gets printed on the console (in extra verbose mode), telling 
that it runs the update step for the external project, but it actually 
does not update the git repository. Strangely, I was able to "fix" this 
problem by playing around in ExternalProject.cmake (from CMake 2.8.4) 
and adding the following line at line 894:

set(comment "${comment}, command: ${command}")

It then does not print the comment anymore, but rather prints the used 
git command line arguments (again in extra verbose mode) and actually 
updates the repository.

Does anybody know what the reason for this strange behavior could be?

Thanks,

Sascha


More information about the CMake mailing list