summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
diff options
context:
space:
mode:
authorMarkus Ferrell <markus.ferrell@kitware.com>2023-03-03 15:48:17 (GMT)
committerMarkus Ferrell <markus.ferrell@kitware.com>2023-03-07 16:43:26 (GMT)
commite1f2b35723f28b55b786bbe4cbee70a3e54e7da9 (patch)
tree6f967531211adff82d72cabd9c049a4c3c109655 /Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
parent35ca2d524befc71b840808cce4e0a773ef722b71 (diff)
downloadCMake-e1f2b35723f28b55b786bbe4cbee70a3e54e7da9.zip
CMake-e1f2b35723f28b55b786bbe4cbee70a3e54e7da9.tar.gz
CMake-e1f2b35723f28b55b786bbe4cbee70a3e54e7da9.tar.bz2
Tutorial: Refactor MakeTable commands into MakeTable.cmake
Diffstat (limited to 'Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake')
-rw-r--r--Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake b/Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
new file mode 100644
index 0000000..12865a9
--- /dev/null
+++ b/Help/guide/tutorial/Step9/MathFunctions/MakeTable.cmake
@@ -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
+ )