HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //usr/share/cmake/Help/prop_sf/CXX_SCAN_FOR_MODULES.rst
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.

.. note ::

  This setting is meaningful only when experimental support for C++ modules
  has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate.