Index: CMakeLists.txt |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
index 542171d0a1e72d23aaa6cf8994e1a8fbc9ea2991..3c7b3afe98d354c237ce46c70553514b99703c51 100644 |
--- a/CMakeLists.txt |
+++ b/CMakeLists.txt |
@@ -52,9 +52,14 @@ endif() |
execute_process(COMMAND git rev-parse HEAD |
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
- OUTPUT_VARIABLE SUBZERO_REVISION |
+ OUTPUT_VARIABLE SZ_GIT_HASH |
OUTPUT_STRIP_TRAILING_WHITESPACE |
) |
-add_definitions(-DSUBZERO_REVISION=${SUBZERO_REVISION}) |
+execute_process(COMMAND git rev-list --count HEAD |
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
+ OUTPUT_VARIABLE SZ_COMMIT_COUNT |
+ OUTPUT_STRIP_TRAILING_WHITESPACE |
+ ) |
+add_definitions(-DSUBZERO_REVISION=${SZ_COMMIT_COUNT}_${SZ_GIT_HASH}) |
target_link_libraries(pnacl-sz pthread) |