make builds with CMake incremental (#592)

This commit is contained in:
Philipp Moritz
2017-05-24 21:52:33 -07:00
committed by Robert Nishihara
parent 997aa35721
commit 3885d1b286
3 changed files with 16 additions and 8 deletions
+5 -2
View File
@@ -15,10 +15,11 @@ include_directories(thirdparty/ae)
set(COMMON_FBS_SRC "${CMAKE_CURRENT_LIST_DIR}/format/common.fbs")
set(OUTPUT_DIR ${CMAKE_CURRENT_LIST_DIR}/format/)
add_custom_target(gen_common_fbs ALL)
set(COMMON_FBS_OUTPUT_FILES
"${OUTPUT_DIR}/common_generated.h")
add_custom_command(
TARGET gen_common_fbs
OUTPUT ${COMMON_FBS_OUTPUT_FILES}
# The --gen-object-api flag generates a C++ class MessageT for each
# flatbuffers message Message, which can be used to store deserialized
# messages in data structures. This is currently used for ObjectInfo for
@@ -28,6 +29,8 @@ add_custom_command(
COMMENT "Running flatc compiler on ${COMMON_FBS_SRC}"
VERBATIM)
add_custom_target(gen_common_fbs DEPENDS ${COMMON_FBS_OUTPUT_FILES})
# Generate Python bindings for the flatbuffers objects.
set(PYTHON_OUTPUT_DIR ${CMAKE_BINARY_DIR}/generated/)
add_custom_command(