diff options
author | Brad King <brad.king@kitware.com> | 2022-11-10 15:11:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-10 15:11:22 (GMT) |
commit | e159b5b2ae0c42ac493c71a9ef1fbc7cc385db55 (patch) | |
tree | 5407b9bb1ac764bdf111c4f7197f2f9fa3fa24d7 /Help/command/add_library.rst | |
parent | 566064ea5e2daeb0f85bb5f08edad980c921d95d (diff) | |
parent | d4d1f8529752f25c64d3d0ab54768b7b93785a3f (diff) | |
download | CMake-e159b5b2ae0c42ac493c71a9ef1fbc7cc385db55.zip CMake-e159b5b2ae0c42ac493c71a9ef1fbc7cc385db55.tar.gz CMake-e159b5b2ae0c42ac493c71a9ef1fbc7cc385db55.tar.bz2 |
Merge topic 'doc-improvements'
d4d1f85297 Help: Move a note about arguments and genexes into include file
968224484f Help: Drop unused `PROPERTY_GENEX` replace from `prop_tgt/INTERFACE_*` files
65457e4fae Help: Add _See Also_ sections to related CMake commands
c86ec79d07 Help: Use direct refs to genexes instead of ``$<GENEX-NAME>``
8c6274326d Help: Use CMake highlighting for command synopsis
c356a94512 Help: Use monospaced font for a genex name in a section title
f98c8707f4 Help: Use `code-block:: cmake` instead of `::` for sub-commands descriptions
2ba351ca4f Help: ``CMake`` → CMake
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7873
Diffstat (limited to 'Help/command/add_library.rst')
-rw-r--r-- | Help/command/add_library.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 7dc4365..43cefca 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -85,8 +85,8 @@ Creates an :ref:`Object Library <Object Libraries>`. An object library compiles source files but does not archive or link their object files into a library. Instead other targets created by :command:`add_library` or :command:`add_executable` may reference the objects using an expression of the -form ``$<TARGET_OBJECTS:objlib>`` as a source, where ``objlib`` is the -object library name. For example: +form :genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>` as a source, where +``objlib`` is the object library name. For example: .. code-block:: cmake @@ -101,7 +101,7 @@ They may contain custom commands generating such sources, but not ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands. Some native build systems (such as Xcode) may not like targets that have only object files, so consider adding at least one real source file to any target that references -``$<TARGET_OBJECTS:objlib>``. +:genex:`$\<TARGET_OBJECTS:objlib\> <TARGET_OBJECTS>`. .. versionadded:: 3.12 Object libraries can be linked to with :command:`target_link_libraries`. @@ -261,3 +261,8 @@ to modify properties of ``<target>``, that is, it may not be used as the operand of :command:`set_property`, :command:`set_target_properties`, :command:`target_link_libraries` etc. An ``ALIAS`` target may not be installed or exported. + +See Also +^^^^^^^^ + +* :command:`add_executable` |