Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit 24af014

Browse files
committed
redisversioning: make ninja happy with generated version header file
1 parent 10ddf11 commit 24af014

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,20 +216,18 @@ else()
216216
VERBATIM)
217217
endif()
218218

219-
220-
include_directories(${CMAKE_BINARY_DIR}/include/)
221-
222219
set(SOUPER_KVSTORE_FILES
223220
lib/KVStore/KVStore.cpp
224221
include/souper/KVStore/KVStore.h
225222
)
226223

227-
# All those components requiring version information need to mention {VERSION_TMP} as their
228-
# dependent.
224+
add_custom_command(OUTPUT ${VERSION_FILE} DEPENDS ${VERSION_TMP})
225+
add_custom_target(genver_h DEPENDS ${VERSION_FILE})
226+
include_directories(${CMAKE_BINARY_DIR}/include/)
227+
229228
add_library(souperKVStore STATIC
230-
${SOUPER_KVSTORE_FILES}
231-
${VERSION_TMP}
232-
)
229+
${SOUPER_KVSTORE_FILES})
230+
add_dependencies(souperKVStore genver_h)
233231

234232
set(SOUPER_INFER_FILES
235233
lib/Infer/InstSynthesis.cpp

0 commit comments

Comments
 (0)