diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-10-28 16:59:42 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-10-28 16:59:42 +0100 |
commit | 095ca93d81cfae0fcb137919231810577c556404 (patch) | |
tree | a5ee059d61dd5c0483657105fb2f5400350f3150 /CMakeLists.txt | |
parent | 5f6177e00fe4c56ece2cabdd61b772ed040c6e19 (diff) | |
download | fastd-095ca93d81cfae0fcb137919231810577c556404.tar fastd-095ca93d81cfae0fcb137919231810577c556404.zip |
Organize method and protocol source files into distinct source directories
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4490bc7..910ba33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,4 +145,15 @@ string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_ETHHDR) configure_file(${FASTD_SOURCE_DIR}/config.h.in ${FASTD_BINARY_DIR}/config.h) +add_custom_target( + version + COMMAND echo "#ifndef _FASTD_VERSION_H_" > ${FASTD_BINARY_DIR}/version.h.new + COMMAND echo "#define _FASTD_VERSION_H_" >> ${FASTD_BINARY_DIR}/version.h.new + COMMAND sh -c "echo \"#define FASTD_VERSION \\\"$(git --git-dir=./.git describe --dirty 2>/dev/null || echo ${FASTD_VERSION})\\\"\"" >> ${FASTD_BINARY_DIR}/version.h.new + COMMAND echo "#endif /* _FASTD_VERSION_H_ */" >> ${FASTD_BINARY_DIR}/version.h.new + COMMAND cmp -s ${FASTD_BINARY_DIR}/version.h.new ${FASTD_BINARY_DIR}/version.h && rm ${FASTD_BINARY_DIR}/version.h.new || mv ${FASTD_BINARY_DIR}/version.h.new ${FASTD_BINARY_DIR}/version.h + WORKING_DIRECTORY "${FASTD_SOURCE_DIR}" + VERBATIM +) + add_subdirectory(src) |