CXX_SCAN_FOR_MODULES¶
在 4.4 版被加入.
CXX_SCAN_FOR_MODULES is a boolean specifying whether CMake will scan the
file set's sources for C++ module dependencies. See also the
CXX_SCAN_FOR_MODULES source file property and the
CXX_SCAN_FOR_MODULES target property settings.
When this property is set ON, CMake will scan the file set's sources 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 sources
at build time. When this property is unset, the
CXX_SCAN_FOR_MODULES source file property and
CXX_SCAN_FOR_MODULES target property are consulted, in that order.
請注意,僅當為目標啟用了 C++20 或更高版本且來源使用 CXX 語言時,才會執行掃描。對於屬於 CXX_MODULES 類型檔案集的來源,始終會執行模組掃描。