Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
3fb54624
Commit
3fb54624
authored
Jul 18, 2011
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] - VERSION file now allows fixed revision number too. Needed for build script
parent
14424394
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
VERSION
VERSION
+8
-4
src/CMakeLists.txt
src/CMakeLists.txt
+1
-0
tools/cmake/BuildUtils.cmake
tools/cmake/BuildUtils.cmake
+2
-2
tools/packaging/owpack
tools/packaging/owpack
+3
-2
No files found.
VERSION
View file @
3fb54624
...
...
@@ -2,13 +2,17 @@
# used and parsed. This file has to be here everytime. The VERSION needs to be
# set properly or CMake will fail.
#
# SYNTAX: The version string always is
X.Y.Z with an optional postfix of "+hg
".
#
If this postfix is set, CMake will replace it with the Mercurial
#
Revision. This is useful for packaging in most cases
.
# SYNTAX: The version string always is
1.2.3 with an optional postfix of "+hg1234
".
#
This is useful if building is done by scripts. If you want to automatically
#
add the correct HG revision, use only +hgX without number
.
#
# IMPORTANT: If you modify the file, cmake re-creates the version header. But
# it is not able to set all library version. Please re-run cmake if
# you change something here.
#
# NOTE: do not add a space after #. The current CMake script will fail.
VERSION=1.2.0+hg
# Examples:
#VERSION=1.2.0
#VERSION=1.2.0+hgX -> replaces the X with the current revision number
#VERSUIB=1.2.0+hg1234 -> here, revision number was set by the build scripts for example.
VERSION=1.2.0+hgX
src/CMakeLists.txt
View file @
3fb54624
...
...
@@ -183,6 +183,7 @@ GET_VERSION_STRING( OW_VERSION OW_API_VERSION )
# We need a SOVERSION too. This somehow describes the API compatibility. We use the major number here.
SPLIT_VERSION_STRING
(
${
OW_API_VERSION
}
OW_VERSION_MAJOR OW_VERSION_MINOR OW_VERSION_PATCH
)
SET
(
OW_SOVERSION
${
OW_VERSION_MAJOR
}
)
MESSAGE
(
FATAL_ERROR
"Hall:
${
OW_VERSION
}
"
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
...
...
tools/cmake/BuildUtils.cmake
View file @
3fb54624
...
...
@@ -434,7 +434,7 @@ FUNCTION( GET_VERSION_STRING _version _api_version )
# Read the version file
FILE
(
READ
${
OW_VERSION_FILENAME
}
OW_VERSION_FILE_CONTENT
)
# The first regex will mathc
STRING
(
REGEX REPLACE
".*[^#]VERSION=([0-9]+
\\
.[0-9]+
\\
.[0-9]+(
\\
+hg)?).*"
"
\\
1"
OW_VERSION_FILE
${
OW_VERSION_FILE_CONTENT
}
)
STRING
(
REGEX REPLACE
".*[^#]VERSION=([0-9]+
\\
.[0-9]+
\\
.[0-9]+(
\\
+hg
X?[0-9]*
)?).*"
"
\\
1"
OW_VERSION_FILE
${
OW_VERSION_FILE_CONTENT
}
)
STRING
(
COMPARE EQUAL
${
OW_VERSION_FILE
}
${
OW_VERSION_FILE_CONTENT
}
OW_VERSION_FILE_INVALID
)
IF
(
OW_VERSION_FILE_INVALID
)
UNSET
(
OW_VERSION_FILE
)
...
...
@@ -463,7 +463,7 @@ FUNCTION( GET_VERSION_STRING _version _api_version )
STRING
(
REGEX REPLACE
"
\\
+hg"
""
OW_VERSION
${
OW_VERSION_FILE
}
)
ELSE
()
# if we have the mercurial info -> complement the version string
STRING
(
REGEX REPLACE
"hg"
"hg
${
OW_VERSION_HG
}
"
OW_VERSION
${
OW_VERSION_FILE
}
)
STRING
(
REGEX REPLACE
"hg
X
"
"hg
${
OW_VERSION_HG
}
"
OW_VERSION
${
OW_VERSION_FILE
}
)
ENDIF
()
SET
(
${
_version
}
${
OW_VERSION
}
PARENT_SCOPE
)
...
...
tools/packaging/owpack
View file @
3fb54624
...
...
@@ -28,10 +28,11 @@
# User Variables
#############################################################################################################
# The version. This is used multiple times. Please set before going on.
VERSION
=
1.2.1
REVISION
=
default
# The version. This is used multiple times. Please set before going on.
VERSION
=
1.2.1+hg
`
hg parents
--template
"{rev}"
`
# Where to find the code
REPOSITORY
=
"ssh://ebaum@berkeley.informatik.uni-leipzig.de//srv/hg/OpenWalnut"
...
...
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