From 2b3043e578f00a5071dfae40c237b86cc6d70c7e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 10 Apr 2014 19:42:06 +0200 Subject: Use #pragma once --- cmake/generate_version.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cmake') 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 -- cgit v1.2.3