summaryrefslogtreecommitdiffstats
path: root/Help/policy
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-10-20 02:39:30 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-10-20 11:18:33 (GMT)
commited45432571e23ccba77cdb64aa3eb7e109e73329 (patch)
tree70bf712bfe2b7faba76127ae84f125f546052b7e /Help/policy
parent0973cd670231ec6a3e09cf22065e4b7dec4503f5 (diff)
downloadCMake-ed45432571e23ccba77cdb64aa3eb7e109e73329.zip
CMake-ed45432571e23ccba77cdb64aa3eb7e109e73329.tar.gz
CMake-ed45432571e23ccba77cdb64aa3eb7e109e73329.tar.bz2
cmNinjaTargetGenerator: do not order-depend on C++ module sources
C++ module sources should not be included by any other TUs, so their presence cannot matter for order-only dependencies of the entire target. Exclude them. Update CMP0154 to take this into consideration and add tests to the `CXXModules` suite (which already deals with module support detection).
Diffstat (limited to 'Help/policy')
-rw-r--r--Help/policy/CMP0154.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Help/policy/CMP0154.rst b/Help/policy/CMP0154.rst
index cb93d41..bf398af 100644
--- a/Help/policy/CMP0154.rst
+++ b/Help/policy/CMP0154.rst
@@ -22,6 +22,12 @@ type ``HEADERS``. With this information, :ref:`Ninja Generators` may omit
the above-mentioned conservative dependencies and produce more efficient
build graphs.
+Additionally, if the custom command's output is a member of a file set of type
+``CXX_MODULES``, it will additionally not be required to exist before
+compiling other sources in the same target. Since these files should not be
+included at compile time directly, they may not be implicitly required to
+exist for other compilation rules.
+
This policy provides compatibility for projects using file sets in targets
with generated header files that have not been updated. Such projects
should be updated to express generated public headers in a file set.