mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-23 00:48:55 +08:00
Tutorial: Refactor MakeTable commands into MakeTable.cmake
This commit is contained in:
10
Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
Normal file
10
Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
Normal 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
|
||||
)
|
Reference in New Issue
Block a user