diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/guide/tutorial/Adding a Library.rst | 13 | ||||
-rw-r--r-- | Help/guide/tutorial/Step2/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Help/guide/tutorial/Step2/TutorialConfig.h.in | 2 | ||||
-rw-r--r-- | Help/guide/tutorial/Step2/tutorial.cxx | 4 | ||||
-rw-r--r-- | Help/manual/cmake-presets.7.rst | 19 | ||||
-rw-r--r-- | Help/release/3.25.rst | 2 |
6 files changed, 23 insertions, 19 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 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 diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index ae6dcb1..da699d8 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -161,7 +161,7 @@ that may contain the following fields: presets by default (except ``name``, ``hidden``, ``inherits``, ``description``, and ``displayName``), but can override them as desired. If multiple ``inherits`` presets provide conflicting values for - the same field, the earlier preset in the ``inherits`` list will be + the same field, the earlier preset in the ``inherits`` array will be preferred. A preset can only inherit from another preset that is defined in the @@ -202,7 +202,7 @@ that may contain the following fields: Optional fields representing the platform and toolset, respectively, for :manual:`generators <cmake-generators(7)>` that support them. - See :option:`cmake -A` option for for possible values for ``architecture`` + See :option:`cmake -A` option for possible values for ``architecture`` and :option:`cmake -T` for ``toolset``. Each may be either a string or an object with the following fields: @@ -226,6 +226,9 @@ that may contain the following fields: ignore the field, but the IDE can use them to set up the environment before invoking CMake. + If no ``strategy`` field is given, or if the field uses the string form + rather than the object form, the behavior is the same as ``"set"``. + ``toolchainFile`` An optional string representing the path to the toolchain file. This field supports `macro expansion`_. If a relative path is specified, @@ -388,7 +391,7 @@ that may contain the following fields: ``inherits`` presets by default (except ``name``, ``hidden``, ``inherits``, ``description``, and ``displayName``), but can override them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` list + values for the same field, the earlier preset in the ``inherits`` array will be preferred. A preset can only inherit from another preset that is defined in the @@ -549,7 +552,7 @@ that may contain the following fields: ``inherits`` presets by default (except ``name``, ``hidden``, ``inherits``, ``description``, and ``displayName``), but can override them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` list + values for the same field, the earlier preset in the ``inherits`` array will be preferred. A preset can only inherit from another preset that is defined in the @@ -891,7 +894,7 @@ fields: ``inherits`` presets by default (except ``name``, ``hidden``, ``inherits``, ``description``, and ``displayName``), but can override them as desired. If multiple ``inherits`` presets provide conflicting - values for the same field, the earlier preset in the ``inherits`` list + values for the same field, the earlier preset in the ``inherits`` array will be preferred. A preset can only inherit from another preset that is defined in the @@ -948,10 +951,10 @@ fields: explicitly specified in this package preset. ``generators`` - An optional list of strings representing generators for CPack to use. + An optional array of strings representing generators for CPack to use. ``configurations`` - An optional list of strings representing build configurations for CPack to + An optional array of strings representing build configurations for CPack to package. ``variables`` @@ -1073,7 +1076,7 @@ object, it has the following fields: A required string to search for. This field supports macro expansion. ``list`` - A required list of strings to search. This field supports macro + A required array of strings to search. This field supports macro expansion, and uses short-circuit evaluation. ``"matches"`` diff --git a/Help/release/3.25.rst b/Help/release/3.25.rst index c119fae..199e067 100644 --- a/Help/release/3.25.rst +++ b/Help/release/3.25.rst @@ -21,7 +21,7 @@ Presets * The :manual:`cmake-presets(7)` format now supports a ``workflowPresets`` field to specify presets for :option:`cmake --workflow`. -* The :manual:`cmake-presets(7)` format now supports a +* The :manual:`cmake-presets(7)` format now supports an ``outputJUnitFile`` field to specify JUnit output in test presets. Languages |