mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
a02d792c6e
The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for targets and for source files rather than assuming "C++20 always needs to be scanned".
20 lines
832 B
ReStructuredText
20 lines
832 B
ReStructuredText
CXX_SCAN_FOR_MODULES
|
|
--------------------
|
|
|
|
.. versionadded:: 3.26
|
|
|
|
``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan the
|
|
source for C++ module dependencies. See also the
|
|
:prop_tgt:`CXX_SCAN_FOR_MODULES` for target-wide settings.
|
|
|
|
When this property is set ``ON``, CMake will scan the source at build time and
|
|
add module dependency information to the compile line as necessary. When this
|
|
property is set ``OFF``, CMake will not scan the source at build time. When
|
|
this property is unset, the :prop_tgt:`CXX_SCAN_FOR_MODULES` property is
|
|
consulted.
|
|
|
|
Note that scanning is only performed if C++20 or higher is enabled for the
|
|
target and the source uses the ``CXX`` language. Scanning for modules in
|
|
sources belonging to file sets of type ``CXX_MODULES`` and
|
|
``CXX_MODULES_HEADER_UNITS`` is always performed.
|