summaryrefslogtreecommitdiff
path: root/Help/guide/tutorial/Step7/CMakeLists.txt
diff options
context:
space:
mode:
authorMarkus Ferrell <markus.ferrell@kitware.com>2023-02-10 16:07:06 -0500
committerMarkus Ferrell <markus.ferrell@kitware.com>2023-02-23 09:42:10 -0500
commit8ddf32196c6bca9c3a80414222327eebd5d51835 (patch)
tree40ad09ab3e93b4d1bbc642fc921f1ddb3737853b /Help/guide/tutorial/Step7/CMakeLists.txt
parent78299083d24fc09c777292effb4fdb9d9ed1d7d3 (diff)
downloadcmake-8ddf32196c6bca9c3a80414222327eebd5d51835.tar.gz
Tutorial: Refactor MathFunctions code
Propagate the refactor in Step 10 MathFunctions through all of the steps. Use MathFunctions/MathFunctions.cxx instead of Tutorial.cxx to determine which sqrt library is called. Adds .h files which correspond to their .cxx files by name.
Diffstat (limited to 'Help/guide/tutorial/Step7/CMakeLists.txt')
-rw-r--r--Help/guide/tutorial/Step7/CMakeLists.txt11
1 files changed, 3 insertions, 8 deletions
diff --git a/Help/guide/tutorial/Step7/CMakeLists.txt b/Help/guide/tutorial/Step7/CMakeLists.txt
index d26a90cee8..97ec6aaa38 100644
--- a/Help/guide/tutorial/Step7/CMakeLists.txt
+++ b/Help/guide/tutorial/Step7/CMakeLists.txt
@@ -16,22 +16,17 @@ target_compile_options(tutorial_compiler_flags INTERFACE
"$<${msvc_cxx}:$<BUILD_INTERFACE:-W3>>"
)
-# should we use our own math functions
-option(USE_MYMATH "Use tutorial provided math implementation" ON)
-
# configure a header file to pass some of the CMake settings
# to the source code
configure_file(TutorialConfig.h.in TutorialConfig.h)
# add the MathFunctions library
-if(USE_MYMATH)
- add_subdirectory(MathFunctions)
- list(APPEND EXTRA_LIBS MathFunctions)
-endif()
+add_subdirectory(MathFunctions)
# add the executable
add_executable(Tutorial tutorial.cxx)
-target_link_libraries(Tutorial PUBLIC ${EXTRA_LIBS} tutorial_compiler_flags)
+
+target_link_libraries(Tutorial PUBLIC MathFunctions tutorial_compiler_flags)
# add the binary tree to the search path for include files
# so that we will find TutorialConfig.h