We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d54a79 commit b0edc0fCopy full SHA for b0edc0f
CMakeLists.txt
@@ -1,13 +1,18 @@
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2
PROJECT(proxyme)
3
4
-# The version number.
+# get the git tag and hash
5
exec_program(
6
"git"
7
${CMAKE_CURRENT_SOURCE_DIR}
8
ARGS "name-rev --tags --name-only $(git rev-parse HEAD)"
9
- OUTPUT_VARIABLE proxyme_VERSION )
10
-set (proxyme_VERSION ${proxyme_VERSION})
+ OUTPUT_VARIABLE proxyme_GITTAG )
+exec_program(
11
+ "git"
12
+ ${CMAKE_CURRENT_SOURCE_DIR}
13
+ ARGS "rev-parse --short HEAD"
14
+ OUTPUT_VARIABLE proxyme_GITHASH )
15
+set (proxyme_VERSION "${proxyme_GITTAG} (${proxyme_GITHASH})")
16
17
# configure a header file to pass some of the CMake settings
18
# to the source code
0 commit comments