summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-10 19:42:06 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-10 19:42:06 +0200
commit2b3043e578f00a5071dfae40c237b86cc6d70c7e (patch)
tree2c7876ce55f85fcbbd58e980dee7ae474b24fe19 /cmake
parent4ab823eb500a8a63061eb23581e73ff9d8bffce1 (diff)
downloadfastd-2b3043e578f00a5071dfae40c237b86cc6d70c7e.tar
fastd-2b3043e578f00a5071dfae40c237b86cc6d70c7e.zip
Use #pragma once
Diffstat (limited to 'cmake')
-rw-r--r--cmake/generate_version.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmake/generate_version.cmake b/cmake/generate_version.cmake
index e4a833c..3830800 100644
--- a/cmake/generate_version.cmake
+++ b/cmake/generate_version.cmake
@@ -2,10 +2,8 @@ set(VERSION_FILE "${FASTD_BINARY_DIR}/src/fastd_version.h")
add_custom_target(
version
- COMMAND echo "#ifndef _FASTD_FASTD_VERSION_H_" > "${VERSION_FILE}.new"
- COMMAND echo "#define _FASTD_FASTD_VERSION_H_" >> "${VERSION_FILE}.new"
+ COMMAND echo "#pragma once" > "${VERSION_FILE}.new"
COMMAND sh -c "echo \"#define FASTD_VERSION \\\"$(git --git-dir=./.git describe --dirty 2>/dev/null || echo ${FASTD_VERSION})\\\"\"" >> "${VERSION_FILE}.new"
- COMMAND echo "#endif /* _FASTD_FASTD_VERSION_H_ */" >> "${VERSION_FILE}.new"
COMMAND cmp -s "${VERSION_FILE}" "${VERSION_FILE}.new" && rm "${VERSION_FILE}.new" || mv "${VERSION_FILE}.new" "${VERSION_FILE}"
WORKING_DIRECTORY "${FASTD_SOURCE_DIR}"
VERBATIM