From bef0b9eb647bcf15ff4b3ca7a97fec2a45be3773 Mon Sep 17 00:00:00 2001 From: Joshua Perrett Date: Fri, 18 Nov 2022 02:11:43 +0000 Subject: Tutorial: Fix exercise in Step 5 to match solution provided in Step 6 If you look at the solution for Step 6, you will see `0.0001` rather than `0.00001` used for the last test case. Fix the typo. --- Help/guide/tutorial/Step5/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Help/guide/tutorial/Step5/CMakeLists.txt b/Help/guide/tutorial/Step5/CMakeLists.txt index c894917..279ddf9 100644 --- a/Help/guide/tutorial/Step5/CMakeLists.txt +++ b/Help/guide/tutorial/Step5/CMakeLists.txt @@ -61,4 +61,4 @@ target_include_directories(Tutorial PUBLIC # Hint: Use the PASS_REGULAR_EXPRESSION property with "4 is 2" # TODO 9: Add more tests. Create a function called do_test to avoid copy + -# paste. Test the following values: 4, 9, 5, 7, 25, -25 and 0.00001. +# paste. Test the following values: 4, 9, 5, 7, 25, -25 and 0.0001. -- cgit v0.12 From 566e12c9762a6061021c1f99a01c7660c34142c2 Mon Sep 17 00:00:00 2001 From: Joshua Perrett Date: Fri, 18 Nov 2022 02:26:04 +0000 Subject: Tutorial: Fix destination of link from Step 6 to Step 5 The link in Step 6 (to "Testing Support") clearly refers to Exercise 2. Fix the location to which the link jumps. --- Help/guide/tutorial/Installing and Testing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Help/guide/tutorial/Installing and Testing.rst b/Help/guide/tutorial/Installing and Testing.rst index aa3fb74..7a59fcb 100644 --- a/Help/guide/tutorial/Installing and Testing.rst +++ b/Help/guide/tutorial/Installing and Testing.rst @@ -1,8 +1,6 @@ Step 5: Installing and Testing ============================== -.. _`Tutorial Testing Support`: - Exercise 1 - Install Rules ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -154,6 +152,8 @@ are similar. To the end of the top-level ``CMakeLists.txt`` we add: That is all that is needed to create a basic local install of the tutorial. +.. _`Tutorial Testing Support`: + Exercise 2 - Testing Support ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v0.12 From f04c548877d9844ee198022e3fce253b0916ca09 Mon Sep 17 00:00:00 2001 From: Joshua Perrett Date: Sat, 19 Nov 2022 19:43:14 +0000 Subject: Tutorial: Fix exercise in Step 10 to match solution provided in Step 11 The solution in Step 11 sets POSITION_INDEPENDENT_CODE to `${BUILD_SHARED_LIBS}`, rather than simply to "True" in all cases. --- Help/guide/tutorial/Selecting Static or Shared Libraries.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Help/guide/tutorial/Selecting Static or Shared Libraries.rst b/Help/guide/tutorial/Selecting Static or Shared Libraries.rst index 1c49c23..7befe1d 100644 --- a/Help/guide/tutorial/Selecting Static or Shared Libraries.rst +++ b/Help/guide/tutorial/Selecting Static or Shared Libraries.rst @@ -65,7 +65,7 @@ At this point, if you build everything, you may notice that linking fails as we are combining a static library without position independent code with a library that has position independent code. The solution to this is to explicitly set the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property of -SqrtLibrary to be ``True`` no matter the build type. +SqrtLibrary to be ``True`` when building shared libraries. .. literalinclude:: Step11/MathFunctions/CMakeLists.txt :caption: MathFunctions/CMakeLists.txt -- cgit v0.12 From 2e3fcf9399b3b4ab38039f90c826c46a3076044d Mon Sep 17 00:00:00 2001 From: Joshua Perrett Date: Wed, 18 Jan 2023 17:58:09 +0000 Subject: Tutorial: Fix typos in Step 11 exercise and solution --- Help/guide/tutorial/Adding Export Configuration.rst | 6 +++--- Help/guide/tutorial/Step12/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Help/guide/tutorial/Adding Export Configuration.rst b/Help/guide/tutorial/Adding Export Configuration.rst index eb14f42..6c83276 100644 --- a/Help/guide/tutorial/Adding Export Configuration.rst +++ b/Help/guide/tutorial/Adding Export Configuration.rst @@ -102,7 +102,7 @@ but prepended with a ``PACKAGE_`` prefix. :end-before: # generate the version file The :command:`write_basic_package_version_file` is next. This command writes -a file which is used by the "find_package" document the version and +a file which is used by :command:`find_package`, documenting the version and compatibility of the desired package. Here, we use the ``Tutorial_VERSION_*`` variables and say that it is compatible with ``AnyNewerVersion``, which denotes that this version or any higher one are compatible with the requested @@ -133,8 +133,8 @@ the following to the bottom of the top level ``CMakeLists.txt``: :caption: CMakeLists.txt :name: CMakeLists.txt-export :language: cmake - :start-after: # needs to be after the install(TARGETS ) command + :start-after: # needs to be after the install(TARGETS) command -With this export call we now generate a ``Targets.cmake``, allowing the +With this export call we now generate a ``MathFunctionsTargets.cmake``, allowing the configured ``MathFunctionsConfig.cmake`` in the build directory to be used by other projects, without needing it to be installed. diff --git a/Help/guide/tutorial/Step12/CMakeLists.txt b/Help/guide/tutorial/Step12/CMakeLists.txt index 220ed4b..1d8b5a6 100644 --- a/Help/guide/tutorial/Step12/CMakeLists.txt +++ b/Help/guide/tutorial/Step12/CMakeLists.txt @@ -94,7 +94,7 @@ install(EXPORT MathFunctionsTargets ) include(CMakePackageConfigHelpers) -# generate the config file that is includes the exports +# generate the config file that includes the exports configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake" INSTALL_DESTINATION "lib/cmake/example" @@ -116,7 +116,7 @@ install(FILES ) # generate the export targets for the build tree -# needs to be after the install(TARGETS ) command +# needs to be after the install(TARGETS) command export(EXPORT MathFunctionsTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsTargets.cmake" ) -- cgit v0.12