Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0b20faf3
Commit
0b20faf3
authored
Feb 13, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use git describe to get source control version
parent
9e4792af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
CMakeLists.txt
CMakeLists.txt
+5
-7
No files found.
CMakeLists.txt
View file @
0b20faf3
...
...
@@ -301,21 +301,19 @@ find_host_program(GIT_EXECUTABLE NAMES ${git_names} PATH_SUFFIXES Git/cmd Git/bi
mark_as_advanced
(
GIT_EXECUTABLE
)
if
(
GIT_EXECUTABLE
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
rev-parse --short HEAD
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
describe --tags --always --dirty --match
"2.[0-9].[0-9]*"
WORKING_DIRECTORY
"
${
OpenCV_SOURCE_DIR
}
"
OUTPUT_VARIABLE OPENCV_
GIT_HASH_SORT
OUTPUT_VARIABLE OPENCV_
VCSVERSION
RESULT_VARIABLE GIT_RESULT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
GIT_RESULT EQUAL 0
)
set
(
OPENCV_VCSVERSION
"commit:
${
OPENCV_GIT_HASH_SORT
}
"
)
else
()
set
(
OPENCV_VCSVERSION
"exported"
)
if
(
NOT GIT_RESULT EQUAL 0
)
set
(
OPENCV_VCSVERSION
"unknown"
)
endif
()
else
()
# We don't have git:
set
(
OPENCV_VCSVERSION
""
)
set
(
OPENCV_VCSVERSION
"
unknown
"
)
endif
()
...
...
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