diff options
author | Brad King <brad.king@kitware.com> | 2016-10-17 14:15:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-17 14:15:17 (GMT) |
commit | 9a2048f1ea6687530e209992c3f5eafcbc02b2a9 (patch) | |
tree | e7903b517c4216e40dd58e27dde1476fbe6c7d11 /Source/cmLocalGenerator.h | |
parent | 248527ed930ea69f9d6953a47b708044c48d5921 (diff) | |
parent | b59b6dd9d27de7839c7b23a3094db33298038896 (diff) | |
download | CMake-9a2048f1ea6687530e209992c3f5eafcbc02b2a9.zip CMake-9a2048f1ea6687530e209992c3f5eafcbc02b2a9.tar.gz CMake-9a2048f1ea6687530e209992c3f5eafcbc02b2a9.tar.bz2 |
Merge topic 'extract-cmRulePlaceholderExpander'
b59b6dd9 cmRulePlaceholderExpander: Port clients to direct-use
bdddd423 cmRulePlaceholderExpander: Extract from cmLocalGenerator
f796e1b6 cmLocalGenerator: Move memset to cxx file
c75a9d66 cmLocalGenerator: Use strings instead of a Target in rule replacement
46ad0d21 cmLocalGenerator: Use a converter in rule replacement API
2628dec1 cmLocalGenerator: Store variable replacements as state
315b9a31 cmLocalGenerator: Merge loops which populate mapping
d5feb5b3 cmLocalGenerator: Populate variable mapping for all replacements
efba22e1 cmLocalGenerator: Extract compiler option replacement from loop
b29425f7 cmLocalGenerator: Populate a container of mappings for replacements
f009d8f5 cmLocalGenerator: Move compiler option handling to be more direct
6cd27a85 cmLocalGenerator: Move variable to where it can be used easily
8b0e4795 cmLocalGenerator: Use the language from the compiler container
88016e2e cmLocalGenerator: Introduce a container of compiler names
be87cb0c cmLocalGenerator: Simplify loop with range algorithm
425cd167 cmLocalGenerator: Remove the launcher from RuleVariables
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r-- | Source/cmLocalGenerator.h | 63 |
1 files changed, 11 insertions, 52 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 69c4101..055e1a9 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -8,6 +8,7 @@ #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmake.h" @@ -23,6 +24,7 @@ class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; +class cmRulePlaceholderExpander; class cmMakefile; class cmSourceFile; class cmLinkLineComputer; @@ -84,6 +86,8 @@ public: return this->GlobalGenerator; } + virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const; + std::string GetLinkLibsCMP0065(std::string const& linkLanguage, cmGeneratorTarget& tgt) const; @@ -217,42 +221,6 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector<std::string>&) {} - // Create a struct to hold the varibles passed into - // ExpandRuleVariables - struct RuleVariables - { - RuleVariables() { memset(this, 0, sizeof(*this)); } - cmGeneratorTarget* CMTarget; - const char* TargetPDB; - const char* TargetCompilePDB; - const char* TargetVersionMajor; - const char* TargetVersionMinor; - const char* Language; - const char* Objects; - const char* Target; - const char* LinkLibraries; - const char* Source; - const char* AssemblySource; - const char* PreprocessedSource; - const char* Output; - const char* Object; - const char* ObjectDir; - const char* ObjectFileDir; - const char* Flags; - const char* ObjectsQuoted; - const char* SONameFlag; - const char* TargetSOName; - const char* TargetInstallNameDir; - const char* LinkFlags; - const char* Manifests; - const char* LanguageCompileFlags; - const char* Defines; - const char* Includes; - const char* RuleLauncher; - const char* DependencyFile; - const char* FilterPrefix; - }; - /** * Get the relative path from the generator output directory to a * per-target support directory. @@ -346,6 +314,9 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles); + const char* GetRuleLauncher(cmGeneratorTarget* target, + const std::string& prop); + protected: ///! put all the libraries for a target on into the given stream void OutputLinkLibraries(cmComputeLinkInformation* pcli, @@ -353,18 +324,6 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, - const RuleVariables& replaceValues); - // Expand rule variables in a single string - std::string ExpandRuleVariable(std::string const& variable, - const RuleVariables& replaceValues); - - const char* GetRuleLauncher(cmGeneratorTarget* target, - const std::string& prop); - void InsertRuleLauncher(std::string& s, cmGeneratorTarget* target, - const std::string& prop); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, @@ -391,11 +350,11 @@ protected: std::vector<cmGeneratorTarget*> OwnedImportedGeneratorTargets; std::map<std::string, std::string> AliasTargets; - bool EmitUniversalBinaryFlags; + std::map<std::string, std::string> Compilers; + std::map<std::string, std::string> VariableMappings; + std::string CompilerSysroot; - // Hack for ExpandRuleVariable until object-oriented version is - // committed. - std::string TargetImplib; + bool EmitUniversalBinaryFlags; KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; |