summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step3
diff options
context:
space:
mode:
authorMarkus Ferrell <markus.ferrell@kitware.com>2022-08-02 18:52:13 (GMT)
committerMarkus Ferrell <markus.ferrell@kitware.com>2022-08-31 21:41:17 (GMT)
commit8c3aa7def7793d54c5e2b5b3b850d756bfe41b02 (patch)
tree9218acbe29bcb65bb4414564f51d5131f5b6e0b7 /Help/guide/tutorial/Step3
parent8c6794abc724d797e1470515e82d791f3baa8ea9 (diff)
downloadCMake-8c3aa7def7793d54c5e2b5b3b850d756bfe41b02.zip
CMake-8c3aa7def7793d54c5e2b5b3b850d756bfe41b02.tar.gz
CMake-8c3aa7def7793d54c5e2b5b3b850d756bfe41b02.tar.bz2
Tutorial: Update step 3 style
Diffstat (limited to 'Help/guide/tutorial/Step3')
-rw-r--r--Help/guide/tutorial/Step3/CMakeLists.txt4
-rw-r--r--Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt4
2 files changed, 8 insertions, 0 deletions
diff --git a/Help/guide/tutorial/Step3/CMakeLists.txt b/Help/guide/tutorial/Step3/CMakeLists.txt
index 1c12816..007770a 100644
--- a/Help/guide/tutorial/Step3/CMakeLists.txt
+++ b/Help/guide/tutorial/Step3/CMakeLists.txt
@@ -14,6 +14,8 @@ option(USE_MYMATH "Use tutorial provided math implementation" ON)
# to the source code
configure_file(TutorialConfig.h.in TutorialConfig.h)
+# TODO 2: Remove EXTRA_INCLUDES list
+
# add the MathFunctions library
if(USE_MYMATH)
add_subdirectory(MathFunctions)
@@ -26,6 +28,8 @@ add_executable(Tutorial tutorial.cxx)
target_link_libraries(Tutorial PUBLIC ${EXTRA_LIBS})
+# TODO 3: Remove use of EXTRA_INCLUDES
+
# add the binary tree to the search path for include files
# so that we will find TutorialConfig.h
target_include_directories(Tutorial PUBLIC
diff --git a/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt
index 8b443a6..7bf05e0 100644
--- a/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt
+++ b/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt
@@ -1 +1,5 @@
add_library(MathFunctions mysqrt.cxx)
+
+# TODO 1: State that anybody linking to MathFunctions needs to include the
+# current source directory, while MathFunctions itself doesn't.
+# Hint: Use target_include_directories with the INTERFACE keyword