Enable parallel tests.
[hoomd-blue.git] / CMake / git / GetGitRevisionDescription.cmake.in
blob7ec4eda966a64671f3603b93a9156d397a5e0409
1
2 # Internal file for GetGitRevisionDescription.cmake
4 # Requires CMake 2.6 or newer (uses the 'function' command)
6 # Original Author:
7 # 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
8 # http://academic.cleardefinition.com
9 # Iowa State University HCI Graduate Program/VRAC
11 # Copyright Iowa State University 2009-2010.
12 # Distributed under the Boost Software License, Version 1.0.
13 # (See accompanying file LICENSE_1_0.txt or copy at
14 # http://www.boost.org/LICENSE_1_0.txt)
16 file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
18 string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
19 if(HEAD_CONTENTS MATCHES "ref")
20     # named branch
21     string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
23     configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
24 else()
25     # detached HEAD
26     configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
27 endif()
29 file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
30 string(STRIP "${HEAD_HASH}" HEAD_HASH)