diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2020-06-11 20:06:02 (GMT) |
---|---|---|
committer | Justin Goshi <jgoshi@microsoft.com> | 2020-06-16 23:32:34 (GMT) |
commit | 742ff97f809410055b22405a6b5728e72c458683 (patch) | |
tree | 3587f801e2f0801ea42b45ba3a7bdc0624cf6d5c /Source/cmGeneratorTarget.h | |
parent | 0892c798f795c6072ce882552384187db86797f0 (diff) | |
download | CMake-742ff97f809410055b22405a6b5728e72c458683.zip CMake-742ff97f809410055b22405a6b5728e72c458683.tar.gz CMake-742ff97f809410055b22405a6b5728e72c458683.tar.bz2 |
Refactor language standard computation
Instead of mutating the configure-time cmTarget's properties at generate
time, compute and store it in a cmGeneratorTarget field.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 3aedbf5..a71e64c 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -148,6 +148,13 @@ public: bool HasExplicitObjectName(cmSourceFile const* file) const; void AddExplicitObjectName(cmSourceFile const* sf); + cmProp GetLanguageStandard(std::string const& lang, + std::string const& config) const; + + cmProp GetLanguageExtensions(std::string const& lang) const; + + bool GetLanguageStandardRequired(std::string const& lang) const; + void GetModuleDefinitionSources(std::vector<cmSourceFile const*>&, const std::string& config) const; void GetExternalObjects(std::vector<cmSourceFile const*>&, @@ -515,6 +522,11 @@ public: bool ComputeCompileFeatures(std::string const& config) const; + using LanguagePair = std::pair<std::string, std::string>; + bool ComputeCompileFeatures( + std::string const& config, + std::set<LanguagePair> const& languagePairs) const; + /** * Trace through the source files in this target and add al source files * that they depend on, used by all generators @@ -1038,6 +1050,11 @@ private: bool GetRPATH(const std::string& config, const std::string& prop, std::string& rpath) const; + mutable std::map<std::string, std::string> LanguageStandardMap; + + cmProp GetLanguageStandardProperty(std::string const& lang, + const char* suffix) const; + public: const std::vector<const cmGeneratorTarget*>& GetLinkImplementationClosure( const std::string& config) const; |