Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
b486439c
Commit
b486439c
authored
13 years ago
by
Russell Taylor
Browse files
Options
Downloads
Patches
Plain Diff
Add a version number (the number of commits since the last release). Re #3977.
parent
e9207c8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Build/CMake/CommonSetup.cmake
+18
-7
18 additions, 7 deletions
Code/Mantid/Build/CMake/CommonSetup.cmake
with
18 additions
and
7 deletions
Code/Mantid/Build/CMake/CommonSetup.cmake
+
18
−
7
View file @
b486439c
...
@@ -66,13 +66,24 @@ find_package ( ZLIB REQUIRED )
...
@@ -66,13 +66,24 @@ find_package ( ZLIB REQUIRED )
set
(
CMAKE_INCLUDE_PATH
${
MAIN_CMAKE_INCLUDE_PATH
}
)
set
(
CMAKE_INCLUDE_PATH
${
MAIN_CMAKE_INCLUDE_PATH
}
)
###########################################################################
###########################################################################
# Previously looked for subversion. Used for version headers - faked if not found.
# Look for Git. Used for version headers - faked if not found.
###########################################################################
###########################################################################
# Just use a dummy version number and print a warning
find_package
(
Git
)
message
(
STATUS
"Until we do something following move to Git - using dummy revision number and date"
)
if
(
GIT_FOUND
)
set
(
MtdVersion_WC_LAST_CHANGED_REV 0
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
describe --tags --long OUTPUT_VARIABLE MtdVersion_WC_LAST_CHANGED_REV
set
(
MtdVersion_WC_LAST_CHANGED_DATE Unknown
)
WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
)
string
(
REGEX MATCH
"[-](.*)[-]"
MtdVersion_WC_LAST_CHANGED_REV
${
MtdVersion_WC_LAST_CHANGED_REV
}
)
string
(
REGEX MATCH
"[^-](.*)[^-]"
MtdVersion_WC_LAST_CHANGED_REV
${
MtdVersion_WC_LAST_CHANGED_REV
}
)
# Will do the date later...
set
(
MtdVersion_WC_LAST_CHANGED_DATE Unknown
)
else
()
# Just use a dummy version number and print a warning
message
(
STATUS
"Git not found - using dummy revision number and date"
)
set
(
MtdVersion_WC_LAST_CHANGED_REV 0
)
set
(
MtdVersion_WC_LAST_CHANGED_DATE Unknown
)
endif
()
mark_as_advanced
(
MtdVersion_WC_LAST_CHANGED_REV MtdVersion_WC_LAST_CHANGED_DATE
)
mark_as_advanced
(
MtdVersion_WC_LAST_CHANGED_REV MtdVersion_WC_LAST_CHANGED_DATE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment