summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-06 22:31:47 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:31 (GMT)
commitfabf1fbabb4fc67844d5b2210e70a9829a59ff23 (patch)
tree9e40776ac9efdcb7b674f2e25f1d47f74b3b7baf /Source/cmMakefile.h
parenta6ae2ea72bc0d4149c2ff6118fcfd577e95c680d (diff)
downloadCMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.zip
CMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.tar.gz
CMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.tar.bz2
stringapi: Use strings in target name
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 331a064..aa25f09 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -127,7 +127,7 @@ public:
* loaded commands, not as part of the usual build process.
*/
int TryCompile(const char *srcdir, const char *bindir,
- const char *projectName, const char *targetName,
+ const char *projectName, const std::string& targetName,
bool fast,
const std::vector<std::string> *cmakeArgs,
std::string *output);
@@ -168,7 +168,7 @@ public:
void Print() const;
/** Add a custom command to the build. */
- void AddCustomCommandToTarget(const char* target,
+ void AddCustomCommandToTarget(const std::string& target,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
cmTarget::CustomCommandType type,
@@ -190,7 +190,7 @@ public:
const char* comment, const char* workingDir,
bool replace = false,
bool escapeOldStyle = true);
- void AddCustomCommandOldStyle(const char* target,
+ void AddCustomCommandOldStyle(const std::string& target,
const std::vector<std::string>& outputs,
const std::vector<std::string>& depends,
const char* source,
@@ -205,10 +205,11 @@ public:
void AddCompileOption(const char* option);
/** Create a new imported target with the name and type given. */
- cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type,
+ cmTarget* AddImportedTarget(const std::string& name,
+ cmTarget::TargetType type,
bool global);
- cmTarget* AddNewTarget(cmTarget::TargetType type, const char* name);
+ cmTarget* AddNewTarget(cmTarget::TargetType type, const std::string& name);
/**
* Add an executable to the build.
@@ -239,16 +240,16 @@ public:
/**
* Add a link library to the build.
*/
- void AddLinkLibrary(const char*);
- void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type);
- void AddLinkLibraryForTarget(const char *tgt, const char*,
+ void AddLinkLibrary(const std::string&);
+ void AddLinkLibrary(const std::string&, cmTarget::LinkLibraryType type);
+ void AddLinkLibraryForTarget(const std::string& tgt, const std::string&,
cmTarget::LinkLibraryType type);
- void AddLinkDirectoryForTarget(const char *tgt, const char* d);
+ void AddLinkDirectoryForTarget(const std::string& tgt, const std::string& d);
/**
* Add a link directory to the build.
*/
- void AddLinkDirectory(const char*);
+ void AddLinkDirectory(const std::string&);
const std::vector<std::string>& GetLinkDirectories() const
{
@@ -323,10 +324,10 @@ public:
/**
* Set the name of the library.
*/
- cmTarget* AddLibrary(const char *libname, cmTarget::TargetType type,
+ cmTarget* AddLibrary(const std::string& libname, cmTarget::TargetType type,
const std::vector<std::string> &srcs,
bool excludeFromAll = false);
- void AddAlias(const char *libname, cmTarget *tgt);
+ void AddAlias(const std::string& libname, cmTarget *tgt);
#if defined(CMAKE_BUILD_WITH_CMAKE)
/**
@@ -534,7 +535,7 @@ public:
cmTarget* FindTargetToUse(const std::string& name,
bool excludeAliases = false) const;
bool IsAlias(const std::string& name) const;
- cmGeneratorTarget* FindGeneratorTargetToUse(const char* name) const;
+ cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
/**
* Mark include directories as system directories.
@@ -878,7 +879,7 @@ public:
protected:
// add link libraries and directories to the target
- void AddGlobalLinkInformation(const char* name, cmTarget& target);
+ void AddGlobalLinkInformation(const std::string& name, cmTarget& target);
// Check for a an unused variable
void CheckForUnused(const char* reason, const std::string& name) const;