diff options
author | Da Quexian <daquexian566@gmail.com> | 2022-06-22 12:18:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-26 14:56:54 (GMT) |
commit | 2eb30a7036214ec960f0666163ff44ef754f6afe (patch) | |
tree | 19f7bc19562409245f326da04371acbca8e9ea85 /Help/command | |
parent | 80e4a155e0feddf1a02fb2701dff5ddbb427552a (diff) | |
download | CMake-2eb30a7036214ec960f0666163ff44ef754f6afe.zip CMake-2eb30a7036214ec960f0666163ff44ef754f6afe.tar.gz CMake-2eb30a7036214ec960f0666163ff44ef754f6afe.tar.bz2 |
add_subdirectory: Add SYSTEM option
Fixes: #22401
Signed-off-by: Da Quexian <daquexian566@gmail.com>
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/add_subdirectory.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Help/command/add_subdirectory.rst b/Help/command/add_subdirectory.rst index 8dba986..13cae10 100644 --- a/Help/command/add_subdirectory.rst +++ b/Help/command/add_subdirectory.rst @@ -5,7 +5,7 @@ Add a subdirectory to the build. .. code-block:: cmake - add_subdirectory(source_dir [binary_dir] [EXCLUDE_FROM_ALL]) + add_subdirectory(source_dir [binary_dir] [EXCLUDE_FROM_ALL] [SYSTEM]) Adds a subdirectory to the build. The source_dir specifies the directory in which the source CMakeLists.txt and code files are @@ -33,3 +33,10 @@ dependencies supersede this exclusion. If a target built by the parent project depends on a target in the subdirectory, the dependee target will be included in the parent project build system to satisfy the dependency. + +If the ``SYSTEM`` argument is provided, the :prop_dir:`SYSTEM` directory +property of the subdirectory will be set to true. This property is +used to initialize the :prop_tgt:`SYSTEM` property of each target +created in that subdirectory. The include directories of targets with +:prop_tgt:`SYSTEM` set to true will be treated as ``SYSTEM`` when +compiling consumers. |