1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-22 07:25:02 +08:00

Tutorial: Refactor MakeTable commands into MakeTable.cmake

This commit is contained in:
Markus Ferrell
2023-03-03 10:48:17 -05:00
parent 35ca2d524b
commit e1f2b35723
21 changed files with 272 additions and 114 deletions

View File

@@ -0,0 +1,10 @@
# first we add the executable that generates the table
add_executable(MakeTable MakeTable.cxx)
target_link_libraries(MakeTable PRIVATE tutorial_compiler_flags)
# add the command to generate the source code
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
COMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.h
DEPENDS MakeTable
)