summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-25 12:11:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-25 12:11:19 (GMT)
commitb5dd256d948947467b3059218a9347d0cf2c513b (patch)
treec26dff384b0716296217a44433a15eef8e4508c0 /Help/command
parent53d8be41183e663d340c0bc210dfe1f4ec97e711 (diff)
parent4e7f67383f297d708efbb6640c9bee188a127d4e (diff)
downloadCMake-b5dd256d948947467b3059218a9347d0cf2c513b.zip
CMake-b5dd256d948947467b3059218a9347d0cf2c513b.tar.gz
CMake-b5dd256d948947467b3059218a9347d0cf2c513b.tar.bz2
Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation. 6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1242
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/add_executable.rst13
-rw-r--r--Help/command/add_library.rst11
2 files changed, 13 insertions, 11 deletions
diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst
index c088796..6763620 100644
--- a/Help/command/add_executable.rst
+++ b/Help/command/add_executable.rst
@@ -7,14 +7,15 @@ Add an executable to the project using the specified source files.
add_executable(<name> [WIN32] [MACOSX_BUNDLE]
[EXCLUDE_FROM_ALL]
- source1 [source2 ...])
+ [source1] [source2 ...])
Adds an executable target called ``<name>`` to be built from the source
-files listed in the command invocation. The ``<name>`` corresponds to the
-logical target name and must be globally unique within a project. The
-actual file name of the executable built is constructed based on
-conventions of the native platform (such as ``<name>.exe`` or just
-``<name>``).
+files listed in the command invocation. (The source files can be omitted
+here if they are added later using :command:`target_sources`.) The
+``<name>`` corresponds to the logical target name and must be globally
+unique within a project. The actual file name of the executable built is
+constructed based on conventions of the native platform (such as
+``<name>.exe`` or just ``<name>``).
By default the executable file will be created in the build tree
directory corresponding to the source tree directory in which the
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index de5335e..78b316d 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -14,13 +14,14 @@ Normal Libraries
add_library(<name> [STATIC | SHARED | MODULE]
[EXCLUDE_FROM_ALL]
- source1 [source2 ...])
+ [source1] [source2 ...])
Adds a library target called ``<name>`` to be built from the source files
-listed in the command invocation. The ``<name>`` corresponds to the
-logical target name and must be globally unique within a project. The
-actual file name of the library built is constructed based on
-conventions of the native platform (such as ``lib<name>.a`` or
+listed in the command invocation. (The source files can be omitted here
+if they are added later using :command:`target_sources`.) The ``<name>``
+corresponds to the logical target name and must be globally unique within
+a project. The actual file name of the library built is constructed based
+on conventions of the native platform (such as ``lib<name>.a`` or
``<name>.lib``).
``STATIC``, ``SHARED``, or ``MODULE`` may be given to specify the type of