diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-04 20:31:00 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-04 20:31:00 +0100 |
commit | 367d37aaf2cfe0fc79c9dc45921234a25c921b04 (patch) | |
tree | 5258ec57c911dd28e24faf779c0271c5e485264c | |
parent | 08a60265a27d6ec7cc11f95820e8160fafaf5c5d (diff) | |
download | fastd-367d37aaf2cfe0fc79c9dc45921234a25c921b04.tar fastd-367d37aaf2cfe0fc79c9dc45921234a25c921b04.zip |
Fix git-describe version command
-rw-r--r-- | src/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b45153..d0b767d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,7 +40,7 @@ add_custom_target( version COMMAND echo "#ifndef _FASTD_VERSION_H_" > ${CMAKE_CURRENT_BINARY_DIR}/version.h.new COMMAND echo "#define _FASTD_VERSION_H_" >> ${CMAKE_CURRENT_BINARY_DIR}/version.h.new - COMMAND sh -c "echo \"#define FASTD_VERSION \\\"\$(git describe --dirty || echo ${FASTD_VERSION})\\\"\"" >> ${CMAKE_CURRENT_BINARY_DIR}/version.h.new + COMMAND sh -c "echo \"#define FASTD_VERSION \\\"\$(git --git-dir=${FASTD_SOURCE_DIR}/.git --work-tree=${FASTD_SOURCE_DIR} describe --dirty || echo ${FASTD_VERSION})\\\"\"" >> ${CMAKE_CURRENT_BINARY_DIR}/version.h.new COMMAND echo "#endif /* _FASTD_VERSION_H_ */" >> ${CMAKE_CURRENT_BINARY_DIR}/version.h.new COMMAND cmp -s ${CMAKE_CURRENT_BINARY_DIR}/version.h.new ${CMAKE_CURRENT_BINARY_DIR}/version.h && rm ${CMAKE_CURRENT_BINARY_DIR}/version.h.new || mv ${CMAKE_CURRENT_BINARY_DIR}/version.h.new ${CMAKE_CURRENT_BINARY_DIR}/version.h WORKING_DIRECTORY "${FASTD_SOURCE_DIR}" |