Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Charles Burton
Gaudi
Commits
14d732f1
Commit
14d732f1
authored
Nov 20, 2012
by
Marco Clemencic
Browse files
allow for anything like HEAD* to be treated as HEAD
parent
ac435669
Changes
2
Hide whitespace changes
Inline
Side-by-side
GaudiPolicy/scripts/createProjVersHeader.py
View file @
14d732f1
...
...
@@ -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
)
...
...
cmake/GaudiProjectConfig.cmake
View file @
14d732f1
...
...
@@ -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
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment