summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2012-07-27 17:38:01 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-13 18:34:43 (GMT)
commit9b66c8faf5a2c0d482c5565056ce844b7b4570ad (patch)
treee2e9fc87f9e955369b3428e1a82423d90fd027e6 /Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
parent2619f4d87a0080cbe6e739529913bf28c0d93d12 (diff)
downloadCMake-9b66c8faf5a2c0d482c5565056ce844b7b4570ad.zip
CMake-9b66c8faf5a2c0d482c5565056ce844b7b4570ad.tar.gz
CMake-9b66c8faf5a2c0d482c5565056ce844b7b4570ad.tar.bz2
ExternalProject: Always do a git fetch for a remote ref.
Remote git refs always require a git fetch, because the remote may move around where the ref points.
Diffstat (limited to 'Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake')
-rw-r--r--Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
index fed40ef..0f9a999 100644
--- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
+++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
@@ -29,12 +29,12 @@ macro(check_a_tag desired_tag resulting_sha)
WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals/Source/TutorialStep1-GIT
RESULT_VARIABLE error_code
OUTPUT_VARIABLE tag_sha
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(error_code)
message(FATAL_ERROR "Could not check the sha.")
endif()
- string(STRIP "${tag_sha}" tag_sha)
if(NOT (${tag_sha} STREQUAL ${resulting_sha}))
message(FATAL_ERROR "UPDATE_COMMAND produced
${tag_sha}
@@ -55,4 +55,6 @@ if(GIT_EXECUTABLE)
check_a_tag(tag2 5842b503ba4113976d9bb28d57b5aee1ad2736b7)
check_a_tag(d19707303 d1970730310fe8bc07e73f15dc570071f9f9654a)
check_a_tag(origin/master 5842b503ba4113976d9bb28d57b5aee1ad2736b7)
+ # This is a remote symbolic ref, so it will always trigger a 'git fetch'
+ check_a_tag(origin/master 5842b503ba4113976d9bb28d57b5aee1ad2736b7)
endif()