diff options
Diffstat (limited to 'Help/guide/tutorial/Step9')
-rw-r--r-- | Help/guide/tutorial/Step9/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Help/guide/tutorial/Step9/MathFunctions/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Help/guide/tutorial/Step9/TutorialConfig.h.in | 3 | ||||
-rw-r--r-- | Help/guide/tutorial/Step9/tutorial.cxx | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/Help/guide/tutorial/Step9/CMakeLists.txt b/Help/guide/tutorial/Step9/CMakeLists.txt index f437053..d5f1cc8 100644 --- a/Help/guide/tutorial/Step9/CMakeLists.txt +++ b/Help/guide/tutorial/Step9/CMakeLists.txt @@ -10,7 +10,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) -# configure a header file to pass the version number only +# 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 diff --git a/Help/guide/tutorial/Step9/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step9/MathFunctions/CMakeLists.txt index b40b464..50f0701 100644 --- a/Help/guide/tutorial/Step9/MathFunctions/CMakeLists.txt +++ b/Help/guide/tutorial/Step9/MathFunctions/CMakeLists.txt @@ -22,10 +22,6 @@ target_include_directories(MathFunctions PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ) -# use compile definitions to state if we have enabled USE_MYMATH -# and that anything that links to use will get this define -target_compile_definitions(MathFunctions INTERFACE "USE_MYMATH") - # install rules install(TARGETS MathFunctions DESTINATION lib) install(FILES MathFunctions.h DESTINATION include) diff --git a/Help/guide/tutorial/Step9/TutorialConfig.h.in b/Help/guide/tutorial/Step9/TutorialConfig.h.in index 8cd2fc9..e23f521 100644 --- a/Help/guide/tutorial/Step9/TutorialConfig.h.in +++ b/Help/guide/tutorial/Step9/TutorialConfig.h.in @@ -1,3 +1,4 @@ -// the configured version number +// the configured options and settings for Tutorial #define Tutorial_VERSION_MAJOR @Tutorial_VERSION_MAJOR@ #define Tutorial_VERSION_MINOR @Tutorial_VERSION_MINOR@ +#cmakedefine USE_MYMATH diff --git a/Help/guide/tutorial/Step9/tutorial.cxx b/Help/guide/tutorial/Step9/tutorial.cxx index 779fbca..b3c6a4f 100644 --- a/Help/guide/tutorial/Step9/tutorial.cxx +++ b/Help/guide/tutorial/Step9/tutorial.cxx @@ -1,7 +1,6 @@ // A simple program that computes the square root of a number #include <cmath> #include <iostream> -#include <sstream> #include <string> #include "TutorialConfig.h" |