summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Adding a Library.rst
diff options
context:
space:
mode:
authorMarkus Ferrell <markus.ferrell@kitware.com>2022-10-25 19:38:21 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-25 20:31:38 (GMT)
commit277fbb3035cbf5de118412172be307849a4315cb (patch)
tree42d753ea4b0cafb3607c08c095901a6192898622 /Help/guide/tutorial/Adding a Library.rst
parentd0451d1a67a880d1c8ff2f2ebfca47904d723bce (diff)
downloadCMake-277fbb3035cbf5de118412172be307849a4315cb.zip
CMake-277fbb3035cbf5de118412172be307849a4315cb.tar.gz
CMake-277fbb3035cbf5de118412172be307849a4315cb.tar.bz2
Tutorial: Restore USE_MYMATH in place of MY_MATH
In commit 80f5d28813 (Tutorial: Update step 2 style, 2022-07-25, v3.25.0-rc1~226^2) we replaced some uses of `USE_MYMATH` with `MY_MATH`. Restore the former name for consistency with the rest of the tutorial.
Diffstat (limited to 'Help/guide/tutorial/Adding a Library.rst')
-rw-r--r--Help/guide/tutorial/Adding a Library.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/Help/guide/tutorial/Adding a Library.rst b/Help/guide/tutorial/Adding a Library.rst
index 46a8909..a56c327 100644
--- a/Help/guide/tutorial/Adding a Library.rst
+++ b/Help/guide/tutorial/Adding a Library.rst
@@ -236,11 +236,12 @@ Getting Started
Start with the resulting files from Exercise 1. Complete ``TODO 7`` through
``TODO 13``.
-First create a variable ``MY_MATH`` using the :command:`option` command
+First create a variable ``USE_MYMATH`` using the :command:`option` command
in the top-level ``CMakeLists.txt`` file. In that same file, use that option
to determine whether to build and use the ``MathFunctions`` library.
-Then, update ``tutorial.cxx`` and ``TutorialConfig.h.in`` to use ``MY_MATH``.
+Then, update ``tutorial.cxx`` and ``TutorialConfig.h.in`` to use
+``USE_MYMATH``.
Build and Run
-------------
@@ -314,9 +315,9 @@ Next, create an :command:`if` statement which checks the value of
:command:`add_subdirectory` command from Exercise 1 with the additional
:command:`list` commands.
-When ``MY_MATH`` is ``ON``, the lists will be generated and will be added to
-our project. When ``MY_MATH`` is ``OFF``, the lists stay empty. With this
-strategy, we allow users to toggle ``MY_MATH`` to manipulate what library is
+When ``USE_MYMATH`` is ``ON``, the lists will be generated and will be added to
+our project. When ``USE_MYMATH`` is ``OFF``, the lists stay empty. With this
+strategy, we allow users to toggle ``USE_MYMATH`` to manipulate what library is
used in the build.
The top-level CMakeLists.txt file will now look like the following:
@@ -380,7 +381,7 @@ will cover the modern approach in the Step 3 of the tutorial.
The corresponding changes to the source code are fairly straightforward.
First, in ``tutorial.cxx``, we include the ``MathFunctions.h`` header if
-``MY_MATH`` is defined.
+``USE_MYMATH`` is defined.
.. raw:: html