summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-03-04 21:12:11 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-03-04 21:12:11 +0100
commit80b7cbe9d92752d5d5db986cb8cf5b0c25242ddb (patch)
tree6ce1dcfbb122a5ed2f88c847c42b7fcbe5afabb1 /src
parent0001460efaad628d9b187948690bf300d25177dd (diff)
downloadfastd-80b7cbe9d92752d5d5db986cb8cf5b0c25242ddb.tar
fastd-80b7cbe9d92752d5d5db986cb8cf5b0c25242ddb.zip
Fix git-describe for paths with spaces
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0478037..c201c6d 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 --git-dir=${FASTD_SOURCE_DIR}/.git --work-tree=${FASTD_SOURCE_DIR} describe --dirty 2>/dev/null || 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 2>/dev/null || 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}"