summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-09 14:29:02 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-09 14:29:02 (GMT)
commitad9f0d831e6522d9606bab7ae08559cebeed83ce (patch)
treed85ba309d378fac37063e7b05fc624e60a819a64 /Source/cmLocalUnixMakefileGenerator3.h
parent6aad93f407f341fae1afb80ebeab532451c39458 (diff)
parentb633b263082ae2c74a030aefb9048b0a20098b61 (diff)
downloadCMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.zip
CMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.tar.gz
CMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.tar.bz2
Merge topic 'dev/string-apis'
b633b263 CPackWiX: Fix test to build with expected config 191f25e2 stringapi: Prevent a NULL dereference in WiX 219d6ad6 speedup: Avoid excess iterator dereferences caaad357 speedup: Cache strings for comparisons 7abf4e31 stringapi: Use strings for dependency information 94fc63e2 stringapi: Use strings for cache iterator values 85fc9f26 stringapi: Command names 6557382d stringapi: Use strings for program paths 1a1b737c stringapi: Use strings for generator names 24b5e93d stringapi: Use strings for directories 11ed3e2c stringapi: Add string overload for the Def struct b3bf31a5 stringapi: Miscellaneous char* parameters 5af95c39 typo: Match argument name with the header 2b17626e stringapi: Pass strings as install directories in CPack 3def29da stringapi: Use strings for feature arguments acb116e3 stringapi: Return a string reference for the configuration ...
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.h')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h41
1 files changed, 22 insertions, 19 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 703369e..39f213b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -55,7 +55,7 @@ public:
// Write out a make rule
void WriteMakeRule(std::ostream& os,
const char* comment,
- const char* target,
+ const std::string& target,
const std::vector<std::string>& depends,
const std::vector<std::string>& commands,
bool symbolic,
@@ -75,7 +75,7 @@ public:
/**
* Set the flag used to keep the make program silent.
*/
- void SetMakeSilentFlag(const char* s) { this->MakeSilentFlag = s; }
+ void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; }
std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; }
/**
@@ -130,8 +130,9 @@ public:
* Set the string used to include one makefile into another default
* is include.
*/
- void SetIncludeDirective(const char* s) { this->IncludeDirective = s; }
- const char *GetIncludeDirective() { return this->IncludeDirective.c_str(); }
+ void SetIncludeDirective(const std::string& s)
+ { this->IncludeDirective = s; }
+ const std::string& GetIncludeDirective() { return this->IncludeDirective; }
/**
* Set max makefile variable size, default is 0 which means unlimited.
@@ -168,7 +169,8 @@ public:
void WriteDivider(std::ostream& os);
/** used to create a recursive make call */
- std::string GetRecursiveMakeCall(const char *makefile, const char* tgt);
+ std::string GetRecursiveMakeCall(const char *makefile,
+ const std::string& tgt);
// append flags to a string
virtual void AppendFlags(std::string& flags, const char* newFlags);
@@ -191,7 +193,8 @@ public:
static std::string ConvertToQuotedOutputPath(const char* p);
- std::string CreateMakeVariable(const char* sin, const char* s2in);
+ std::string CreateMakeVariable(const std::string& sin,
+ const std::string& s2in);
/** Called from command-line hook to bring dependencies up to date
for a target. */
@@ -210,14 +213,14 @@ public:
// File pairs for implicit dependency scanning. The key of the map
// is the depender and the value is the explicit dependee.
struct ImplicitDependFileMap:
- public std::map<cmStdString, cmDepends::DependencyVector> {};
+ public std::map<std::string, cmDepends::DependencyVector> {};
struct ImplicitDependLanguageMap:
- public std::map<cmStdString, ImplicitDependFileMap> {};
+ public std::map<std::string, ImplicitDependFileMap> {};
struct ImplicitDependTargetMap:
- public std::map<cmStdString, ImplicitDependLanguageMap> {};
+ public std::map<std::string, ImplicitDependLanguageMap> {};
ImplicitDependLanguageMap const& GetImplicitDepends(cmTarget const& tgt);
- void AddImplicitDepends(cmTarget const& tgt, const char* lang,
+ void AddImplicitDepends(cmTarget const& tgt, const std::string& lang,
const char* obj, const char* src);
void AppendGlobalTargetDepends(std::vector<std::string>& depends,
@@ -230,7 +233,7 @@ public:
std::string objNoTargetDir,
bool hasSourceExtension);
- std::vector<cmStdString> const& GetLocalHelp() { return this->LocalHelp; }
+ std::vector<std::string> const& GetLocalHelp() { return this->LocalHelp; }
/** Get whether to create rules to generate preprocessed and
assembly sources. This could be converted to a variable lookup
@@ -255,7 +258,7 @@ protected:
// write the target rules for the local Makefile into the stream
void WriteLocalMakefileTargets(std::ostream& ruleFileStream,
- std::set<cmStdString> &emitted);
+ std::set<std::string> &emitted);
// this method Writes the Directory information files
void WriteDirectoryInformationFile();
@@ -273,8 +276,8 @@ protected:
void WriteConvenienceRule(std::ostream& ruleFileStream,
- const char* realTarget,
- const char* helpTarget);
+ const std::string& realTarget,
+ const std::string& helpTarget);
void WriteTargetDependRule(std::ostream& ruleFileStream,
cmTarget& target);
@@ -358,7 +361,7 @@ private:
cmTarget* Target;
std::string Language;
LocalObjectEntry(): Target(0), Language() {}
- LocalObjectEntry(cmTarget* t, const char* lang):
+ LocalObjectEntry(cmTarget* t, const std::string& lang):
Target(t), Language(lang) {}
};
struct LocalObjectInfo: public std::vector<LocalObjectEntry>
@@ -369,16 +372,16 @@ private:
LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false),
HasAssembleRule(false) {}
};
- std::map<cmStdString, LocalObjectInfo> LocalObjectFiles;
+ std::map<std::string, LocalObjectInfo> LocalObjectFiles;
void WriteObjectConvenienceRule(std::ostream& ruleFileStream,
const char* comment, const char* output,
LocalObjectInfo const& info);
- std::vector<cmStdString> LocalHelp;
+ std::vector<std::string> LocalHelp;
/* does the work for each target */
- std::map<cmStdString, cmStdString> MakeVariableMap;
- std::map<cmStdString, cmStdString> ShortMakeVariableMap;
+ std::map<std::string, std::string> MakeVariableMap;
+ std::map<std::string, std::string> ShortMakeVariableMap;
};
#endif