Tutorial: Update step 3 style

This commit is contained in:
Markus Ferrell
2022-08-02 14:52:13 -04:00
parent 8c6794abc7
commit 8c3aa7def7
4 changed files with 125 additions and 26 deletions
+4
View File
@@ -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
@@ -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