CXX_SCAN_FOR_MODULES.rst 922 B

12345678910111213141516171819202122
  1. CXX_SCAN_FOR_MODULES
  2. --------------------
  3. .. versionadded:: 3.28
  4. ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan C++
  5. sources in the target for module dependencies. See also the
  6. :prop_sf:`CXX_SCAN_FOR_MODULES` for per-source settings which, if set,
  7. overrides the target-wide settings.
  8. This property is initialized by the value of the
  9. :variable:`CMAKE_CXX_SCAN_FOR_MODULES` variable if it is set when a target is
  10. created.
  11. When this property is set ``ON`` or unset, CMake will scan the target's
  12. ``CXX`` sources at build time and add module dependency information to the
  13. compile line as necessary. When this property is set ``OFF``, CMake will not
  14. scan the target's ``CXX`` sources at build time.
  15. Note that scanning is only performed if C++20 or higher is enabled for the
  16. target. Scanning for modules in the target's sources belonging to file sets
  17. of type ``CXX_MODULES`` is always performed.