summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h91
1 files changed, 26 insertions, 65 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 19469be..6314aff 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -8,7 +8,8 @@
#include "cmListFileCache.h"
#include "cmOutputConverter.h"
#include "cmPolicies.h"
-#include "cmState.h"
+#include "cmRulePlaceholderExpander.h"
+#include "cmStateTypes.h"
#include "cmake.h"
#include <cm_kwiml.h>
@@ -19,11 +20,14 @@
#include <string>
#include <vector>
+class cmComputeLinkInformation;
class cmCustomCommandGenerator;
class cmGeneratorTarget;
class cmGlobalGenerator;
+class cmRulePlaceholderExpander;
class cmMakefile;
class cmSourceFile;
+class cmLinkLineComputer;
/** \class cmLocalGenerator
* \brief Create required build files for a directory.
@@ -82,8 +86,13 @@ public:
return this->GlobalGenerator;
}
+ virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const;
+
+ std::string GetLinkLibsCMP0065(std::string const& linkLanguage,
+ cmGeneratorTarget& tgt) const;
+
cmState* GetState() const;
- cmState::Snapshot GetStateSnapshot() const;
+ cmStateSnapshot GetStateSnapshot() const;
void AddArchitectureFlags(std::string& flags,
cmGeneratorTarget const* target,
@@ -212,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.
@@ -309,10 +282,11 @@ public:
/** Fill out these strings for the given target. Libraries to link,
* flags, and linkflags. */
- void GetTargetFlags(const std::string& config, std::string& linkLibs,
+ void GetTargetFlags(cmLinkLineComputer* linkLineComputer,
+ const std::string& config, std::string& linkLibs,
std::string& flags, std::string& linkFlags,
std::string& frameworkPath, std::string& linkPath,
- cmGeneratorTarget* target, bool useWatcomQuote);
+ cmGeneratorTarget* target);
void GetTargetDefines(cmGeneratorTarget const* target,
std::string const& config, std::string const& lang,
std::set<std::string>& defines) const;
@@ -340,24 +314,15 @@ public:
void CreateEvaluationFileOutputs(const std::string& config);
void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles);
-protected:
- ///! put all the libraries for a target on into the given stream
- void OutputLinkLibraries(std::string& linkLibraries,
- std::string& frameworkPath, std::string& linkPath,
- cmGeneratorTarget&, bool relink,
- bool forResponseFile, bool useWatcomQuote);
-
- // 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);
+
+protected:
+ ///! put all the libraries for a target on into the given stream
+ void OutputLinkLibraries(cmComputeLinkInformation* pcli,
+ cmLinkLineComputer* linkLineComputer,
+ std::string& linkLibraries,
+ std::string& frameworkPath, std::string& linkPath);
// Handle old-style install rules stored in the targets.
void GenerateTargetInstallRules(
@@ -367,16 +332,12 @@ protected:
std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
std::string const& dir_max);
- virtual std::string ConvertToLinkReference(
- std::string const& lib,
- cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL);
-
/** Check whether the native build system supports the given
definition. Issues a warning. */
virtual bool CheckDefinition(std::string const& define) const;
cmMakefile* Makefile;
- cmState::Snapshot StateSnapshot;
+ cmStateSnapshot StateSnapshot;
cmListFileBacktrace DirectoryBacktrace;
cmGlobalGenerator* GlobalGenerator;
std::map<std::string, std::string> UniqueObjectNamesMap;
@@ -389,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;