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
ac435669
Commit
ac435669
authored
Nov 20, 2012
by
Marco Clemencic
Browse files
modified project version handling to understand HEAD as v999r999
parent
547a12e7
Changes
3
Show whitespace changes
Inline
Side-by-side
GaudiPolicy/doc/release.notes
View file @
ac435669
package
GaudiPolicy
package
manager
:
Marco
Clemencic
! 2012-11-20 - Marco Clemencic
-
Modified
createProjVersHeader
.
py
to
understand
version
'HEAD'
as
v999r999
.
! 2012-11-13 - Marco Clemencic
-
Modified
qmtest_summarize
.
py
to
work
under
CMake
too
.
...
...
GaudiPolicy/scripts/createProjVersHeader.py
View file @
ac435669
...
...
@@ -16,6 +16,9 @@ def main():
if
not
opts
.
quiet
:
print
"Creating %s for %s %s"
%
(
outputfile
,
project
,
version
)
if
version
==
'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
)
majver
=
int
(
m
.
groupdict
()[
'maj_ver'
])
minver
=
int
(
m
.
groupdict
()[
'min_ver'
])
...
...
cmake/GaudiProjectConfig.cmake
View file @
ac435669
...
...
@@ -100,10 +100,17 @@ macro(gaudi_project project version)
message
(
FATAL_ERROR
"Wrong arguments."
)
endif
()
string
(
REGEX MATCH
"v?([0-9]+)[r.]([0-9]+)([p.]([0-9]+))?"
_version
${
version
}
)
if
(
NOT CMAKE_PROJECT_VERSION STREQUAL 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"
)
set
(
CMAKE_PROJECT_VERSION_PATCH
${
CMAKE_MATCH_4
}
CACHE INTERNAL
"Patch version of project"
)
else
()
# 'HEAD' version is special
set
(
CMAKE_PROJECT_VERSION_MAJOR 999
)
set
(
CMAKE_PROJECT_VERSION_MINOR 999
)
set
(
CMAKE_PROJECT_VERSION_PATCH 0
)
endif
()
#--- Project Options and Global settings----------------------------------------------------------
option
(
BUILD_SHARED_LIBS
"Set to OFF to build static libraries."
ON
)
...
...
@@ -231,7 +238,7 @@ macro(gaudi_project project version)
string
(
TOUPPER
${
project
}
_proj
)
execute_process
(
COMMAND
${
versheader_cmd
}
--quiet
${
project
}
${
version
}
${
CMAKE_BINARY_DIR
}
/include/
${
_proj
}
_VERSION.h
)
${
project
}
${
CMAKE_PROJECT_VERSION
}
${
CMAKE_BINARY_DIR
}
/include/
${
_proj
}
_VERSION.h
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/include/
${
_proj
}
_VERSION.h DESTINATION include
)
# Add generated headers to the include path.
include_directories
(
${
CMAKE_BINARY_DIR
}
/include
)
...
...
@@ -449,9 +456,8 @@ macro(_gaudi_use_other_projects)
set
(
other_project_cmake_version
${
other_project_cmake_version
}
.
${
CMAKE_MATCH_4
}
)
endif
()
else
()
# "HEAD" is a special version id, that should be ignored when checking
# other projects versions.
set
(
other_project_cmake_version
)
# empty version string means 'any version'
# "HEAD" is a special version id (mapped to v999r999).
set
(
other_project_cmake_version 999.999
)
endif
()
if
(
NOT
${
other_project
}
_FOUND
)
...
...
Write
Preview
Supports
Markdown
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