diff options
author | Brad King <brad.king@kitware.com> | 2010-04-23 14:01:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-04-23 14:01:49 (GMT) |
commit | 0328379411386abc89ba07991f858cdacca926b2 (patch) | |
tree | 72dd2d12ced1daa4f2dc1b182089c934e01fdb34 /Tests | |
parent | e49b6eca4f5857bcf7bfc08e34d0797a3400bcf2 (diff) | |
download | CMake-0328379411386abc89ba07991f858cdacca926b2.zip CMake-0328379411386abc89ba07991f858cdacca926b2.tar.gz CMake-0328379411386abc89ba07991f858cdacca926b2.tar.bz2 |
Report commit hash in CMake development versions
For builds from Git repositories, add "-g<commit>" to the end of the
version number. If the source tree is modified, append "-dirty".
For builds from CVS checkouts, add "-cvs-<branch>".
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 31cf0fc..74cc115 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -232,4 +232,5 @@ TRY_COMPILE(EXPORTER_COMPILED MESSAGE(STATUS "Searching for export(PACKAGE) test project") SET(CMakeTestExportPackage_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) -FIND_PACKAGE(CMakeTestExportPackage 1.${CMAKE_VERSION} EXACT REQUIRED) +STRING(REGEX REPLACE "-.*$" "" version ${CMAKE_VERSION}) +FIND_PACKAGE(CMakeTestExportPackage 1.${version} EXACT REQUIRED) |