From 24af014238a6b95adf1ea0c591a8e16f7d232288 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Mon, 11 Feb 2019 14:17:44 -0700 Subject: [PATCH] redisversioning: make ninja happy with generated version header file --- CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 920350de2..5e16686c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,20 +216,18 @@ else() VERBATIM) endif() - -include_directories(${CMAKE_BINARY_DIR}/include/) - set(SOUPER_KVSTORE_FILES lib/KVStore/KVStore.cpp include/souper/KVStore/KVStore.h ) -# All those components requiring version information need to mention {VERSION_TMP} as their -# dependent. +add_custom_command(OUTPUT ${VERSION_FILE} DEPENDS ${VERSION_TMP}) +add_custom_target(genver_h DEPENDS ${VERSION_FILE}) +include_directories(${CMAKE_BINARY_DIR}/include/) + add_library(souperKVStore STATIC - ${SOUPER_KVSTORE_FILES} - ${VERSION_TMP} -) + ${SOUPER_KVSTORE_FILES}) +add_dependencies(souperKVStore genver_h) set(SOUPER_INFER_FILES lib/Infer/InstSynthesis.cpp