diff options
author | Brad King <brad.king@kitware.com> | 2021-09-27 17:46:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-27 17:46:58 (GMT) |
commit | 6c4ebcbf40c606a5ca6fa8a4a4befe45fcc88e1e (patch) | |
tree | a8489e59dc6546b52cb55ceab581a990a53ea28c /Help | |
parent | 8dc72232d9b3f8a572d05a1d719a88b318b0058b (diff) | |
parent | 68e0f72744320e9ffb3ae3c39b648386dc0296ad (diff) | |
download | CMake-6c4ebcbf40c606a5ca6fa8a4a4befe45fcc88e1e.zip CMake-6c4ebcbf40c606a5ca6fa8a4a4befe45fcc88e1e.tar.gz CMake-6c4ebcbf40c606a5ca6fa8a4a4befe45fcc88e1e.tar.bz2 |
Merge topic 'tutorial_update_stage_2'
68e0f72744 Tutorial: Describe placement of add_subdirectory
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6559
Diffstat (limited to 'Help')
-rw-r--r-- | Help/guide/tutorial/Adding a Library.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Help/guide/tutorial/Adding a Library.rst b/Help/guide/tutorial/Adding a Library.rst index 1806361..ed03448 100644 --- a/Help/guide/tutorial/Adding a Library.rst +++ b/Help/guide/tutorial/Adding a Library.rst @@ -64,8 +64,13 @@ will be stored in the cache so that the user does not need to set the value each time they run CMake on a build directory. The next change is to make building and linking the ``MathFunctions`` library -conditional. To do this we change the end of the top-level ``CMakeLists.txt`` -file to look like the following: +conditional. To do this, we will create an ``if`` statement which checks the +value of the option. Inside the ``if`` block, put the +:command:`add_subdirectory` command from above with some additional list +commands to store information needed to link to the library and add the +subdirectory as an include directory in the ``Tutorial`` target. +The end of the top-level ``CMakeLists.txt`` file will now look like the +following: .. literalinclude:: Step3/CMakeLists.txt :caption: CMakeLists.txt |