Просмотр исходного кода

Merge topic 'tutorial_update_stage_2'

68e0f72744 Tutorial: Describe placement of add_subdirectory

Acked-by: Kitware Robot <[email protected]>
Merge-request: !6559
Brad King 4 лет назад
Родитель
Сommit
6c4ebcbf40
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      Help/guide/tutorial/Adding a Library.rst

+ 7 - 2
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.
 each time they run CMake on a build directory.
 
 
 The next change is to make building and linking the ``MathFunctions`` library
 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
 .. literalinclude:: Step3/CMakeLists.txt
   :caption: CMakeLists.txt
   :caption: CMakeLists.txt