summaryrefslogtreecommitdiffstats
path: root/Help/guide
diff options
context:
space:
mode:
Diffstat (limited to 'Help/guide')
-rw-r--r--Help/guide/tutorial/Adding Usage Requirements for a Library.rst4
-rw-r--r--Help/guide/tutorial/Adding a Library.rst13
-rw-r--r--Help/guide/tutorial/Installing and Testing.rst23
-rw-r--r--Help/guide/tutorial/Step1/CMakeLists.txt2
-rw-r--r--Help/guide/tutorial/Step2/CMakeLists.txt2
-rw-r--r--Help/guide/tutorial/Step2/TutorialConfig.h.in2
-rw-r--r--Help/guide/tutorial/Step2/tutorial.cxx4
7 files changed, 26 insertions, 24 deletions
diff --git a/Help/guide/tutorial/Adding Usage Requirements for a Library.rst b/Help/guide/tutorial/Adding Usage Requirements for a Library.rst
index f9dc7cc..4aef050 100644
--- a/Help/guide/tutorial/Adding Usage Requirements for a Library.rst
+++ b/Help/guide/tutorial/Adding Usage Requirements for a Library.rst
@@ -63,8 +63,8 @@ Build and Run
Make a new directory called ``Step3_build``, run the :manual:`cmake
<cmake(1)>` executable or the :manual:`cmake-gui <cmake-gui(1)>` to
configure the project and then build it with your chosen build tool or by
-using ``cmake --build .`` from the build directory. Here's a refresher of
-what that looks like from the command line:
+using :option:`cmake --build . <cmake --build>` from the build directory.
+Here's a refresher of what that looks like from the command line:
.. code-block:: console
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
diff --git a/Help/guide/tutorial/Installing and Testing.rst b/Help/guide/tutorial/Installing and Testing.rst
index 3969192..fa13040 100644
--- a/Help/guide/tutorial/Installing and Testing.rst
+++ b/Help/guide/tutorial/Installing and Testing.rst
@@ -52,17 +52,18 @@ Make a new directory called ``Step5_build``. Run the
:manual:`cmake-gui <cmake-gui(1)>` to configure the project and then build it
with your chosen build tool.
-Then, run the install step by using the ``install`` option of the
-:manual:`cmake <cmake(1)>` command (introduced in 3.15, older versions of
-CMake must use ``make install``) from the command line. This step will
-install the appropriate header files, libraries, and executables. For example:
+Then, run the install step by using the :option:`--install <cmake --install>`
+option of the :manual:`cmake <cmake(1)>` command (introduced in 3.15, older
+versions of CMake must use ``make install``) from the command line. This step
+will install the appropriate header files, libraries, and executables.
+For example:
.. code-block:: console
cmake --install .
-For multi-configuration tools, don't forget to use the ``--config`` argument to
-specify the configuration.
+For multi-configuration tools, don't forget to use the
+:option:`--config <cmake--build --config>` argument to specify the configuration.
.. code-block:: console
@@ -76,9 +77,9 @@ install target from the command line like the following:
cmake --build . --target install --config Debug
The CMake variable :variable:`CMAKE_INSTALL_PREFIX` is used to determine the
-root of where the files will be installed. If using the ``cmake --install``
-command, the installation prefix can be overridden via the ``--prefix``
-argument. For example:
+root of where the files will be installed. If using the :option:`cmake --install`
+command, the installation prefix can be overridden via the
+:option:`--prefix <cmake--install --prefix>` argument. For example:
.. code-block:: console
@@ -194,9 +195,9 @@ Build and Run
-------------
Navigate to the build directory and rebuild the application. Then, run the
-:manual:`ctest <ctest(1)>` executable: ``ctest -N`` and ``ctest -VV``. For
+``ctest`` executable: :option:`ctest -N` and :option:`ctest -VV`. For
multi-config generators (e.g. Visual Studio), the configuration type must be
-specified with the ``-C <mode>`` flag. For example, to run tests in Debug
+specified with the :option:`-C \<mode\> <ctest -C>` flag. For example, to run tests in Debug
mode use ``ctest -C Debug -VV`` from the build directory
(not the Debug subdirectory!). Release mode would be executed from the same
location but with a ``-C Release``. Alternatively, build the ``RUN_TESTS``
diff --git a/Help/guide/tutorial/Step1/CMakeLists.txt b/Help/guide/tutorial/Step1/CMakeLists.txt
index 282951a..6fcce90 100644
--- a/Help/guide/tutorial/Step1/CMakeLists.txt
+++ b/Help/guide/tutorial/Step1/CMakeLists.txt
@@ -5,7 +5,7 @@
# TODO 7: Set the project version number as 1.0 in the above project command
# TODO 6: Set the variable CMAKE_CXX_STANDARD to 11
-# and the variable CMAKE_CXX_REQUIRED_STANDARD to True
+# and the variable CMAKE_CXX_STANDARD_REQUIRED to True
# TODO 8: Use configure_file to configure and copy TutorialConfig.h.in to
# TutorialConfig.h
diff --git a/Help/guide/tutorial/Step2/CMakeLists.txt b/Help/guide/tutorial/Step2/CMakeLists.txt
index 2f7d56e..2b96128 100644
--- a/Help/guide/tutorial/Step2/CMakeLists.txt
+++ b/Help/guide/tutorial/Step2/CMakeLists.txt
@@ -7,7 +7,7 @@ project(Tutorial VERSION 1.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
-# TODO 7: Create a variable MY_MATH using option and set default to ON
+# TODO 7: Create a variable USE_MYMATH using option and set default to ON
# configure a header file to pass some of the CMake settings
# to the source code
diff --git a/Help/guide/tutorial/Step2/TutorialConfig.h.in b/Help/guide/tutorial/Step2/TutorialConfig.h.in
index adb4c55..6c09e1a 100644
--- a/Help/guide/tutorial/Step2/TutorialConfig.h.in
+++ b/Help/guide/tutorial/Step2/TutorialConfig.h.in
@@ -2,4 +2,4 @@
#define Tutorial_VERSION_MAJOR @Tutorial_VERSION_MAJOR@
#define Tutorial_VERSION_MINOR @Tutorial_VERSION_MINOR@
-// TODO 13: use cmakedefine to define MY_MATH
+// TODO 13: use cmakedefine to define USE_MYMATH
diff --git a/Help/guide/tutorial/Step2/tutorial.cxx b/Help/guide/tutorial/Step2/tutorial.cxx
index f83aa7e..87f5e0f 100644
--- a/Help/guide/tutorial/Step2/tutorial.cxx
+++ b/Help/guide/tutorial/Step2/tutorial.cxx
@@ -5,7 +5,7 @@
#include "TutorialConfig.h"
-// TODO 11: Only include MathFunctions if MY_MATH is defined
+// TODO 11: Only include MathFunctions if USE_MYMATH is defined
// TODO 5: Include MathFunctions.h
@@ -22,7 +22,7 @@ int main(int argc, char* argv[])
// convert input to double
const double inputValue = std::stod(argv[1]);
- // TODO 12: Use mysqrt if MY_MATH is defined and sqrt otherwise
+ // TODO 12: Use mysqrt if USE_MYMATH is defined and sqrt otherwise
// TODO 6: Replace sqrt with mysqrt