summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-07-08 20:12:02 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-09 10:33:52 (GMT)
commit1235f2d747770535a388cd763c95cde8c9244375 (patch)
tree5fe38c96951731f04e7904fa9fc5316d9e386207 /Help
parent177052d6b8b4127a9d345830fb3d82384e9d5b50 (diff)
downloadCMake-1235f2d747770535a388cd763c95cde8c9244375.zip
CMake-1235f2d747770535a388cd763c95cde8c9244375.tar.gz
CMake-1235f2d747770535a388cd763c95cde8c9244375.tar.bz2
set_property: Allow both DIRECTORY and TARGET_DIRECTORY together
Allow to specify both DIRECTORY and TARGET_DIRECTORY at the same time in `set_source_files_properties()` and `set_property(SOURCE)` commands. Add test cases and update the documentation. Fixes: #20932
Diffstat (limited to 'Help')
-rw-r--r--Help/command/set_property.rst5
-rw-r--r--Help/command/set_source_files_properties.rst5
2 files changed, 6 insertions, 4 deletions
diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst
index de28be3..ccbd635 100644
--- a/Help/command/set_property.rst
+++ b/Help/command/set_property.rst
@@ -9,7 +9,8 @@ Set a named property in a given scope.
DIRECTORY [<dir>] |
TARGET [<target1> ...] |
SOURCE [<src1> ...]
- [<TARGET_DIRECTORY ... | DIRECTORY ...>] |
+ [TARGET_DIRECTORY <target1> ...]
+ [DIRECTORY <dir1> ...] |
INSTALL [<file1> ...] |
TEST [<test1> ...] |
CACHE [<entry1> ...] >
@@ -38,7 +39,7 @@ It must be one of the following:
file properties are by default visible only to targets added in the same
directory (``CMakeLists.txt``).
The file properties can be made visible in a different directory by specifying
- one of the additional options: ``TARGET_DIRECTORY`` or ``DIRECTORY``.
+ one or both of the additional options: ``TARGET_DIRECTORY`` and ``DIRECTORY``.
``DIRECTORY`` takes a list of processed directories paths, and sets the file
properties in those directory scopes.
diff --git a/Help/command/set_source_files_properties.rst b/Help/command/set_source_files_properties.rst
index 8adfb9e..59d5ba3 100644
--- a/Help/command/set_source_files_properties.rst
+++ b/Help/command/set_source_files_properties.rst
@@ -6,7 +6,8 @@ Source files can have properties that affect how they are built.
.. code-block:: cmake
set_source_files_properties([file1 [file2 [...]]]
- [<TARGET_DIRECTORY ... | DIRECTORY ...>]
+ [TARGET_DIRECTORY <target1> ...]
+ [DIRECTORY <dir1> ...]
PROPERTIES prop1 value1
[prop2 value2 [...]])
@@ -17,7 +18,7 @@ Note that source file properties are by default visible only to
targets added in the same directory (``CMakeLists.txt``).
The file properties can be made visible in a different directory by specifying
-one of the additional options: ``TARGET_DIRECTORY`` or ``DIRECTORY``.
+one or both of the additional options: ``TARGET_DIRECTORY`` and ``DIRECTORY``.
``DIRECTORY`` takes a list of processed directories paths, and sets the file
properties in those directory scopes.