summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-06-03 21:30:07 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-06-03 21:30:07 (GMT)
commit29383b4b85fc0f728a166a9d4e8abf123f862212 (patch)
tree1b30a32669fab56c033f0a853d214d1e079528e5 /Tests
parentd569b48b7adaf59a0df54f45c998a591ba51637e (diff)
downloadCMake-29383b4b85fc0f728a166a9d4e8abf123f862212.zip
CMake-29383b4b85fc0f728a166a9d4e8abf123f862212.tar.gz
CMake-29383b4b85fc0f728a166a9d4e8abf123f862212.tar.bz2
Add FindGit module.
Use it from ExternalProject and the ExternalProject test's CMakeLists file rather than having duplicate find_program calls. Add logic so that we do not try to use *.cmd variants of git programs when using the MSYS Makefiles generator. Should fix the last remaining dashboard issue with the new ExternalProject git support additions. Also, correct minor problem regarding placement of the local git repo during test execution. On clean builds, it was being placed incorrectly because of the ../.. relative reference. Use an absolute path to place the local git repo in the proper directory, and only use the relative reference when referring to it.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 8257e90..2e387cb 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -5,7 +5,7 @@ include(ExternalProject)
find_package(CVS)
find_package(Subversion)
-find_program(git_EXECUTABLE NAMES git.cmd git eg.cmd eg DOC "git command line client")
+find_package(Git)
set(base "${CMAKE_BINARY_DIR}/CMakeExternals")
set(binary_base "${base}/Build")
@@ -302,11 +302,11 @@ endif()
set(do_git_tests 0)
-if(git_EXECUTABLE)
+if(GIT_EXECUTABLE)
set(do_git_tests 1)
execute_process(
- COMMAND "${git_EXECUTABLE}" --version
+ COMMAND "${GIT_EXECUTABLE}" --version
OUTPUT_VARIABLE ov
OUTPUT_STRIP_TRAILING_WHITESPACE
)
@@ -328,10 +328,10 @@ if(do_git_tests)
#
set(proj SetupLocalGITRepository)
ExternalProject_Add(${proj}
- SOURCE_DIR ${local_git_repo}
+ SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/LocalRepositories/GIT
URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo.tgz
BUILD_COMMAND ""
- CONFIGURE_COMMAND "${git_EXECUTABLE}" --version
+ CONFIGURE_COMMAND "${GIT_EXECUTABLE}" --version
INSTALL_COMMAND ""
)
@@ -444,4 +444,4 @@ message(STATUS "can_build_tutorial_step5='${can_build_tutorial_step5}'")
message(STATUS "do_cvs_tests='${do_cvs_tests}'")
message(STATUS "do_svn_tests='${do_svn_tests}'")
message(STATUS "do_git_tests='${do_git_tests}'")
-message(STATUS "git_EXECUTABLE='${git_EXECUTABLE}'")
+message(STATUS "GIT_EXECUTABLE='${GIT_EXECUTABLE}'")