diff options
author | Brad King <brad.king@kitware.com> | 2014-04-29 13:36:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-29 13:36:55 (GMT) |
commit | bbc358c3fc1f09fe2a483996ae1359dba3f587f4 (patch) | |
tree | acbe60addb92ac90fc7c91f187a9d9226c2a95dd /Source/cmFunctionCommand.cxx | |
parent | 0cce556b5fbe629dccee294aeece7c275343ed64 (diff) | |
parent | c51d07d4397ceed55c534a036ef81df44b741ff6 (diff) | |
download | CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.zip CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.gz CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.bz2 |
Merge branch 'master' into osx-init-early
Resolve conflict in Source/cmGlobalGenerator.cxx by integrating
changes from both sides.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r-- | Source/cmFunctionCommand.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 85b89d9..3580374 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -20,7 +20,7 @@ public: cmFunctionHelperCommand() {} ///! clean up any memory allocated by the function - ~cmFunctionHelperCommand() {}; + ~cmFunctionHelperCommand() {} /** * This is used to avoid including this command @@ -59,12 +59,12 @@ public: cmExecutionStatus &); virtual bool InitialPass(std::vector<std::string> const&, - cmExecutionStatus &) { return false; }; + cmExecutionStatus &) { return false; } /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return this->Args[0].c_str(); } + virtual std::string GetName() const { return this->Args[0]; } cmTypeMacro(cmFunctionHelperCommand, cmCommand); @@ -89,7 +89,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass std::string errorMsg = "Function invoked with incorrect arguments for function named: "; errorMsg += this->Args[0]; - this->SetError(errorMsg.c_str()); + this->SetError(errorMsg); return false; } @@ -113,15 +113,15 @@ bool cmFunctionHelperCommand::InvokeInitialPass { cmOStringStream tmpStream; tmpStream << "ARGV" << t; - this->Makefile->AddDefinition(tmpStream.str().c_str(), + this->Makefile->AddDefinition(tmpStream.str(), expandedArgs[t].c_str()); - this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str()); + this->Makefile->MarkVariableAsUsed(tmpStream.str()); } // define the formal arguments for (unsigned int j = 1; j < this->Args.size(); ++j) { - this->Makefile->AddDefinition(this->Args[j].c_str(), + this->Makefile->AddDefinition(this->Args[j], expandedArgs[j-1].c_str()); } @@ -219,8 +219,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, } std::string newName = "_" + this->Args[0]; - mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), - newName.c_str()); + mf.GetCMakeInstance()->RenameCommand(this->Args[0], + newName); mf.AddCommand(f); // remove the function blocker now that the function is defined |