Commit 14d732f1 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

allow for anything like HEAD* to be treated as HEAD

parent ac435669
......@@ -16,7 +16,7 @@ def main():
if not opts.quiet:
print "Creating %s for %s %s" % (outputfile, project, version)
if version == 'HEAD':
if version.startswith('HEAD'):
majver, minver, patver = 999, 999, 0 # special handling
else:
m = re.match("(v|([A-Za-z]+\-))(?P<maj_ver>[0-9]+)(r|\-)(?P<min_ver>[0-9]+)(?:(p|\-)(?P<pat_ver>[0-9]+))?", version)
......
......@@ -100,7 +100,7 @@ macro(gaudi_project project version)
message(FATAL_ERROR "Wrong arguments.")
endif()
if(NOT CMAKE_PROJECT_VERSION STREQUAL HEAD)
if(NOT CMAKE_PROJECT_VERSION MATCHES "^HEAD.*")
string(REGEX MATCH "v?([0-9]+)[r.]([0-9]+)([p.]([0-9]+))?" _version ${CMAKE_PROJECT_VERSION})
set(CMAKE_PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1} CACHE INTERNAL "Major version of project")
set(CMAKE_PROJECT_VERSION_MINOR ${CMAKE_MATCH_2} CACHE INTERNAL "Minor version of project")
......@@ -448,7 +448,7 @@ macro(_gaudi_use_other_projects)
list(GET ARGN_ 1 other_project_version)
list(REMOVE_AT ARGN_ 0 1)
if(NOT other_project_version STREQUAL HEAD)
if(NOT other_project_version MATCHES "^HEAD.*")
string(REGEX MATCH "v?([0-9]+)[r.]([0-9]+)([p.]([0-9]+))?" _version ${other_project_version})
set(other_project_cmake_version ${CMAKE_MATCH_1}.${CMAKE_MATCH_2})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment