mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-04 14:50:23 +00:00
FILE_SET: Fix CMP0211-related documentation
Commit 4f120beea9 (FILE_SET: relax file uniqueness for HEADERS type,
2026-05-10) relaxed the restriction on file uniqueness in file sets, but
did not correctly update all instances of the documentation. Change the
wording to be a bit clearer and update all instances.
This commit is contained in:
@@ -80,8 +80,8 @@ have zero or more named file sets. Each file set has a name, a type, a scope of
|
||||
files within those directories.
|
||||
|
||||
.. versionchanged:: 4.4
|
||||
A file may only belong to at most one file set in a target. See policy
|
||||
:policy:`CMP0211`.
|
||||
A file may belong to at most one non-``HEADERS`` file set in a target.
|
||||
See policy :policy:`CMP0211`.
|
||||
|
||||
The acceptable types include:
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ Policies Introduced by CMake 4.4
|
||||
CMP0214: Honor CMAKE_EXE_LINKER_FLAGS for Swift executable targets. </policy/CMP0214>
|
||||
CMP0213: file(ARCHIVE_{CREATE,EXTRACT}) encode archive paths as UTF-8 by default. </policy/CMP0213>
|
||||
CMP0212: add_custom_command DEPENDS does not strip .exe suffixes. </policy/CMP0212>
|
||||
CMP0211: A file may belong to at most one file set in a target. </policy/CMP0211>
|
||||
CMP0211: A file may belong to at most one non-HEADERS file set in a target. </policy/CMP0211>
|
||||
|
||||
Policies Introduced by CMake 4.3
|
||||
--------------------------------
|
||||
|
||||
@@ -3,8 +3,8 @@ CMP0211
|
||||
|
||||
.. versionadded:: 4.4
|
||||
|
||||
A file may belong to at most one :ref:`file set <file sets>` in a target except
|
||||
for the ``HEADERS`` file set type.
|
||||
A file may belong to at most one non-``HEADERS`` :ref:`file set <file sets>`
|
||||
in a target.
|
||||
|
||||
In CMake 4.3 and below, it was possible to specify the same file
|
||||
in multiple file sets in a target. In CMake 4.4 and above, a file
|
||||
|
||||
@@ -631,8 +631,9 @@ class cmMakefile;
|
||||
"CMAKE_<LANG>_LINK_FLAGS adds link flags to all target types.", 4, \
|
||||
3, 0, WARN) \
|
||||
SELECT(POLICY, CMP0211, \
|
||||
"A file may belong to at most one file set in a target.", 4, 4, 0, \
|
||||
WARN) \
|
||||
"A file may belong to at most one non-HEADERS file set in a " \
|
||||
"target.", \
|
||||
4, 4, 0, WARN) \
|
||||
SELECT(POLICY, CMP0212, \
|
||||
"add_custom_command DEPENDS does not strip .exe suffixes.", 4, 4, 0, \
|
||||
WARN) \
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
CMake Warning \(policy\) in CMakeLists\.txt:
|
||||
Policy CMP0211 is not set: A file may belong to at most one file set in a
|
||||
target\. Run "cmake --help-policy CMP0211" for policy details\. Use the
|
||||
cmake_policy command to set the policy and suppress this warning\.
|
||||
Policy CMP0211 is not set: A file may belong to at most one non-HEADERS
|
||||
file set in a target\. Run "cmake --help-policy CMP0211" for policy
|
||||
details\. Use the cmake_policy command to set the policy and suppress this
|
||||
warning\.
|
||||
|
||||
In target "foo1" the file
|
||||
|
||||
@@ -12,9 +13,10 @@ This warning is for project developers\. Use -Wno-author or -Wno-policy to
|
||||
suppress it\.
|
||||
|
||||
CMake Warning \(policy\) in CMakeLists\.txt:
|
||||
Policy CMP0211 is not set: A file may belong to at most one file set in a
|
||||
target\. Run "cmake --help-policy CMP0211" for policy details\. Use the
|
||||
cmake_policy command to set the policy and suppress this warning\.
|
||||
Policy CMP0211 is not set: A file may belong to at most one non-HEADERS
|
||||
file set in a target\. Run "cmake --help-policy CMP0211" for policy
|
||||
details\. Use the cmake_policy command to set the policy and suppress this
|
||||
warning\.
|
||||
|
||||
In target "foo2" the file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user