diff options
author | Markus Ferrell <markus.ferrell@kitware.com> | 2022-07-20 13:24:40 -0400 |
---|---|---|
committer | Markus Ferrell <markus.ferrell@kitware.com> | 2022-08-08 17:15:48 -0400 |
commit | ccba87b05b022cc021580b65ae51bbae0002fadb (patch) | |
tree | e90c94d2bb65845b23c483dae801cfbd8cf498d3 /Help/guide/tutorial/Selecting Static or Shared Libraries.rst | |
parent | ad20e7b2ae6e698b6778f0572f1a03fdf1fcacda (diff) | |
download | cmake-ccba87b05b022cc021580b65ae51bbae0002fadb.tar.gz |
Tutorial: Move step 10 to step 4
Shifts steps 4-9 to 5-10.
Diffstat (limited to 'Help/guide/tutorial/Selecting Static or Shared Libraries.rst')
-rw-r--r-- | Help/guide/tutorial/Selecting Static or Shared Libraries.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Help/guide/tutorial/Selecting Static or Shared Libraries.rst b/Help/guide/tutorial/Selecting Static or Shared Libraries.rst index 2d5f70e06a..1c49c23a5e 100644 --- a/Help/guide/tutorial/Selecting Static or Shared Libraries.rst +++ b/Help/guide/tutorial/Selecting Static or Shared Libraries.rst @@ -1,5 +1,5 @@ -Step 9: Selecting Static or Shared Libraries -============================================ +Step 10: Selecting Static or Shared Libraries +============================================= In this section we will show how the :variable:`BUILD_SHARED_LIBS` variable can be used to control the default behavior of :command:`add_library`, @@ -19,7 +19,7 @@ library. The first step is to update the starting section of the top-level ``CMakeLists.txt`` to look like: -.. literalinclude:: Step10/CMakeLists.txt +.. literalinclude:: Step11/CMakeLists.txt :caption: CMakeLists.txt :name: CMakeLists.txt-option-BUILD_SHARED_LIBS :language: cmake @@ -33,7 +33,7 @@ explicitly require that SqrtLibrary is built statically. The end result is that ``MathFunctions/CMakeLists.txt`` should look like: -.. literalinclude:: Step10/MathFunctions/CMakeLists.txt +.. literalinclude:: Step11/MathFunctions/CMakeLists.txt :caption: MathFunctions/CMakeLists.txt :name: MathFunctions/CMakeLists.txt-add_library-STATIC :language: cmake @@ -42,7 +42,7 @@ The end result is that ``MathFunctions/CMakeLists.txt`` should look like: Next, update ``MathFunctions/mysqrt.cxx`` to use the ``mathfunctions`` and ``detail`` namespaces: -.. literalinclude:: Step10/MathFunctions/mysqrt.cxx +.. literalinclude:: Step11/MathFunctions/mysqrt.cxx :caption: MathFunctions/mysqrt.cxx :name: MathFunctions/mysqrt.cxx-namespace :language: c++ @@ -56,7 +56,7 @@ uses ``USE_MYMATH``: Finally, update ``MathFunctions/MathFunctions.h`` to use dll export defines: -.. literalinclude:: Step10/MathFunctions/MathFunctions.h +.. literalinclude:: Step11/MathFunctions/MathFunctions.h :caption: MathFunctions/MathFunctions.h :name: MathFunctions/MathFunctions.h :language: c++ @@ -67,7 +67,7 @@ library that has position independent code. The solution to this is to explicitly set the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property of SqrtLibrary to be ``True`` no matter the build type. -.. literalinclude:: Step10/MathFunctions/CMakeLists.txt +.. literalinclude:: Step11/MathFunctions/CMakeLists.txt :caption: MathFunctions/CMakeLists.txt :name: MathFunctions/CMakeLists.txt-POSITION_INDEPENDENT_CODE :language: cmake |