diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-17 18:50:24 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-18 12:54:31 (GMT) |
commit | a02d792c6e9bf9200ab652db6b6da415d80b578c (patch) | |
tree | 6c9d224ad9d3f53ca53cbf0e51b7092834c4308d /Source/cmNinjaTargetGenerator.h | |
parent | 008c09d6db60f7c24781b47414ffa26edbd0e22d (diff) | |
download | CMake-a02d792c6e9bf9200ab652db6b6da415d80b578c.zip CMake-a02d792c6e9bf9200ab652db6b6da415d80b578c.tar.gz CMake-a02d792c6e9bf9200ab652db6b6da415d80b578c.tar.bz2 |
cxxmodules: add properties to control scanning
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".
Diffstat (limited to 'Source/cmNinjaTargetGenerator.h')
-rw-r--r-- | Source/cmNinjaTargetGenerator.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index bb75fb3..d09f04b 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -19,6 +19,7 @@ #include "cmOSXBundleGenerator.h" class cmCustomCommand; +class cmFileSet; class cmGeneratedFileStream; class cmGeneratorTarget; class cmLocalNinjaGenerator; @@ -67,8 +68,14 @@ protected: cmFileSet const* GetFileSetForSource(std::string const& config, cmSourceFile const* sf); + enum class WithScanning + { + No, + Yes, + }; std::string LanguageCompilerRule(const std::string& lang, - const std::string& config) const; + const std::string& config, + WithScanning withScanning) const; std::string LanguagePreprocessAndScanRule(std::string const& lang, const std::string& config) const; std::string LanguageScanRule(std::string const& lang, @@ -76,6 +83,8 @@ protected: std::string LanguageDyndepRule(std::string const& lang, const std::string& config) const; bool NeedDyndep(std::string const& lang, std::string const& config) const; + bool NeedDyndepForSource(std::string const& lang, std::string const& config, + cmSourceFile const* sf); bool NeedExplicitPreprocessing(std::string const& lang) const; bool CompileWithDefines(std::string const& lang) const; bool NeedCxxModuleSupport(std::string const& lang, @@ -154,6 +163,8 @@ protected: const std::string& config); void WriteCompileRule(const std::string& language, const std::string& config); + void WriteCompileRule(const std::string& language, const std::string& config, + WithScanning withScanning); void WriteObjectBuildStatements(const std::string& config, const std::string& fileConfig, bool firstForConfig); |