Skip to content

Commit

Permalink
Correct the OUTPUT of add_custom_command so CMake/Ninja know when it …
Browse files Browse the repository at this point in the history
…doesn't need to run (#392)
  • Loading branch information
afuller-TT authored Dec 11, 2024
1 parent 0ec99b0 commit e8bf964
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions device/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
set(POSITION_INDEPENDENT_CODE ON)

set(FBS_FILE ${PROJECT_SOURCE_DIR}/device/simulation/tt_simulation_device.fbs)
get_filename_component(FBS_FILE_NAME ${FBS_FILE} NAME)
get_filename_component(FBS_FILE_NAME ${FBS_FILE} NAME_WLE)
set(FBS_GENERATED_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${FBS_FILE_NAME}_generated.h")
add_custom_command(
OUTPUT
${FBS_GENERATED_HEADER}
COMMAND
flatc
ARGS
--cpp -o "${CMAKE_CURRENT_BINARY_DIR}/" ${FBS_FILE}
flatc --cpp -o "${CMAKE_CURRENT_BINARY_DIR}/" ${FBS_FILE}
DEPENDS
flatc
${FBS_FILE}
Expand Down

0 comments on commit e8bf964

Please sign in to comment.