summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step12
diff options
context:
space:
mode:
Diffstat (limited to 'Help/guide/tutorial/Step12')
-rw-r--r--Help/guide/tutorial/Step12/MathFunctions/CMakeLists.txt11
-rw-r--r--Help/guide/tutorial/Step12/MathFunctions/MakeTable.cmake10
2 files changed, 11 insertions, 10 deletions
diff --git a/Help/guide/tutorial/Step12/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step12/MathFunctions/CMakeLists.txt
index a85f3cb..38694dd 100644
--- a/Help/guide/tutorial/Step12/MathFunctions/CMakeLists.txt
+++ b/Help/guide/tutorial/Step12/MathFunctions/CMakeLists.txt
@@ -15,16 +15,7 @@ if(USE_MYMATH)
target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH")
- # 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
- )
+ include(MakeTable.cmake) # generates Table.h
# library that just does sqrt
add_library(SqrtLibrary STATIC
diff --git a/Help/guide/tutorial/Step12/MathFunctions/MakeTable.cmake b/Help/guide/tutorial/Step12/MathFunctions/MakeTable.cmake
new file mode 100644
index 0000000..12865a9
--- /dev/null
+++ b/Help/guide/tutorial/Step12/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
+ )