summaryrefslogtreecommitdiffstats
path: root/Source/cmVariableRequiresCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-12 14:42:38 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-12 14:42:38 (GMT)
commitcb8f87f6229359790956a6640639bbe6b8c346f7 (patch)
tree3501cbf4a528b475b8da15b88e0b14879bddd4c2 /Source/cmVariableRequiresCommand.cxx
parent9defc45f78d4fe10928fd0a94ffa97fc80f5da56 (diff)
parent3be265b304da0879c79e2fcdfff6f25b1a4e87c1 (diff)
downloadCMake-cb8f87f6229359790956a6640639bbe6b8c346f7.zip
CMake-cb8f87f6229359790956a6640639bbe6b8c346f7.tar.gz
CMake-cb8f87f6229359790956a6640639bbe6b8c346f7.tar.bz2
Merge topic 'remove-c_str-calls'
3be265b3 Workaround Sun C++ 5.9 compiler crash af8a1643 Remove c_str calls when using stream APIs. 21c573f6 Remove some c_str() calls.
Diffstat (limited to 'Source/cmVariableRequiresCommand.cxx')
-rw-r--r--Source/cmVariableRequiresCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx
index ddb4003..80c1286 100644
--- a/Source/cmVariableRequiresCommand.cxx
+++ b/Source/cmVariableRequiresCommand.cxx
@@ -26,7 +26,7 @@ bool cmVariableRequiresCommand
}
std::string testVariable = args[0];
- if(!this->Makefile->IsOn(testVariable.c_str()))
+ if(!this->Makefile->IsOn(testVariable))
{
return true;
}
@@ -36,7 +36,7 @@ bool cmVariableRequiresCommand
bool hasAdvanced = false;
for(unsigned int i = 2; i < args.size(); ++i)
{
- if(!this->Makefile->IsOn(args[i].c_str()))
+ if(!this->Makefile->IsOn(args[i]))
{
requirementsMet = false;
notSet += args[i];
@@ -49,13 +49,13 @@ bool cmVariableRequiresCommand
}
}
}
- const char* reqVar = this->Makefile->GetDefinition(resultVariable.c_str());
+ const char* reqVar = this->Makefile->GetDefinition(resultVariable);
// if reqVar is unset, then set it to requirementsMet
// if reqVar is set to true, but requirementsMet is false , then
// set reqVar to false.
if(!reqVar || (!requirementsMet && this->Makefile->IsOn(reqVar)))
{
- this->Makefile->AddDefinition(resultVariable.c_str(), requirementsMet);
+ this->Makefile->AddDefinition(resultVariable, requirementsMet);
}
if(!requirementsMet)