Skip to content

Commit

Permalink
correct format for visibility levels
Browse files Browse the repository at this point in the history
  • Loading branch information
code4yonglei committed Sep 10, 2024
1 parent 300bf2d commit 08e7579
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/targets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Why it is robust to use targets and properties than using variables? Given a tar

More description about the source code:

1. The ``account`` target declares the ``account.cpp`` source file as ``PRIVATE`` since it is only needed to produce the shared library.
1. The ``account`` target declares the ``account.cpp`` source file as ``PRIVATE`` since it is only needed to produce the shared library.

.. code-block:: cmake
Expand All @@ -139,7 +139,7 @@ Why it is robust to use targets and properties than using variables? Given a tar
account.cpp
)
2. The ``-ffast-math`` is instead ``PUBLIC`` as it needs to be propagated to all targets consuming ``account``.
2. The ``-ffast-math`` is instead ``PUBLIC`` as it needs to be propagated to all targets consuming ``account``.

.. code-block:: cmake
Expand All @@ -148,7 +148,7 @@ Why it is robust to use targets and properties than using variables? Given a tar
"-ffast-math"
)
3. The ``account`` folder is an include directory with ``INTERFACE`` visibility because only targets consuming ``account`` need to know where ``account.hpp`` is located.
3. The ``account`` folder is an include directory with ``INTERFACE`` visibility because only targets consuming ``account`` need to know where ``account.hpp`` is located.

.. code-block:: cmake
Expand All @@ -157,7 +157,7 @@ Why it is robust to use targets and properties than using variables? Given a tar
${CMAKE_CURRENT_SOURCE_DIR}
)
.. callout:: Rule of thumb for visibility settings
.. callout:: Rule of thumb for visibility settings

When working out which visibility settings to use for the properties of your targets you can refer to the following table:

Expand Down

0 comments on commit 08e7579

Please sign in to comment.