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

Commit def5df6

Browse files
committed
redisversioning: make ninja happy with generated version header file
1 parent 716d0b6 commit def5df6

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
@@ -221,20 +221,18 @@ else()
221221
VERBATIM)
222222
endif()
223223

224-
225-
include_directories(${CMAKE_BINARY_DIR}/include/)
226-
227224
set(SOUPER_KVSTORE_FILES
228225
lib/KVStore/KVStore.cpp
229226
include/souper/KVStore/KVStore.h
230227
)
231228

232-
# All those components requiring version information need to mention {VERSION_TMP} as their
233-
# dependent.
229+
add_custom_command(OUTPUT ${VERSION_FILE} DEPENDS ${VERSION_TMP})
230+
add_custom_target(genver_h DEPENDS ${VERSION_FILE})
231+
include_directories(${CMAKE_BINARY_DIR}/include/)
232+
234233
add_library(souperKVStore STATIC
235-
${SOUPER_KVSTORE_FILES}
236-
${VERSION_TMP}
237-
)
234+
${SOUPER_KVSTORE_FILES})
235+
add_dependencies(souperKVStore genver_h)
238236

239237
set(SOUPER_INFER_FILES
240238
lib/Infer/InstSynthesis.cpp

0 commit comments

Comments
 (0)