diff options
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/add_executable.rst | 22 | ||||
-rw-r--r-- | Help/command/add_library.rst | 9 |
2 files changed, 25 insertions, 6 deletions
diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst index 0a7d7e1..e073228 100644 --- a/Help/command/add_executable.rst +++ b/Help/command/add_executable.rst @@ -1,8 +1,15 @@ add_executable -------------- +.. only:: html + + .. contents:: + Add an executable to the project using the specified source files. +Normal Executables +^^^^^^^^^^^^^^^^^^ + .. code-block:: cmake add_executable(<name> [WIN32] [MACOSX_BUNDLE] @@ -45,7 +52,8 @@ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are pre-processed, and you want to have the original sources reachable from within IDE. --------------------------------------------------------------------------- +Imported Executables +^^^^^^^^^^^^^^^^^^^^ .. code-block:: cmake @@ -65,7 +73,8 @@ whose names begin in ``IMPORTED_``. The most important such property is the main executable file on disk. See documentation of the ``IMPORTED_*`` properties for more information. --------------------------------------------------------------------------- +Alias Executables +^^^^^^^^^^^^^^^^^ .. code-block:: cmake @@ -74,8 +83,13 @@ properties for more information. Creates an :ref:`Alias Target <Alias Targets>`, such that ``<name>`` can be used to refer to ``<target>`` in subsequent commands. The ``<name>`` does not appear in the generated buildsystem as a make target. The -``<target>`` may not be a non-``GLOBAL`` -:ref:`Imported Target <Imported Targets>` or an ``ALIAS``. +``<target>`` may not be an ``ALIAS``. + +An ``ALIAS`` to a non-``GLOBAL`` :ref:`Imported Target <Imported Targets>` +has scope in the directory in which the alias is created and below. +The :prop_tgt:`ALIAS_GLOBAL` target property can be used to check if the +alias is global or not. + ``ALIAS`` targets can be used as targets to read properties from, executables for custom commands and custom targets. They can also be tested for existence with the regular :command:`if(TARGET)` subcommand. diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 7274e44..01c415a 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -139,8 +139,13 @@ Alias Libraries Creates an :ref:`Alias Target <Alias Targets>`, such that ``<name>`` can be used to refer to ``<target>`` in subsequent commands. The ``<name>`` does not appear in the generated buildsystem as a make target. The ``<target>`` -may not be a non-``GLOBAL`` :ref:`Imported Target <Imported Targets>` or an -``ALIAS``. +may not be an ``ALIAS``. + +An ``ALIAS`` to a non-``GLOBAL`` :ref:`Imported Target <Imported Targets>` +has scope in the directory in which the alias is created and below. +The :prop_tgt:`ALIAS_GLOBAL` target property can be used to check if the +alias is global or not. + ``ALIAS`` targets can be used as linkable targets and as targets to read properties from. They can also be tested for existence with the regular :command:`if(TARGET)` subcommand. The ``<name>`` may not be used |