summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index e62a40e..cdc9f2a 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -53,7 +53,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting STATIC type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -66,7 +66,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting SHARED type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -79,7 +79,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting MODULE type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -92,7 +92,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting OBJECT type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -105,7 +105,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting UNKNOWN type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -118,7 +118,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting ALIAS type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -130,21 +130,21 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting/multiple types.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
if (isAlias)
{
cmOStringStream e;
e << "INTERFACE library specified with conflicting ALIAS type.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
if (excludeFromAll)
{
cmOStringStream e;
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -157,7 +157,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
++s;
@@ -177,7 +177,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "GLOBAL option may only be used with IMPORTED libraries.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
else
@@ -192,14 +192,14 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "INTERFACE library requires no source arguments.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
if (importGlobal && !importTarget)
{
cmOStringStream e;
e << "INTERFACE library specified as GLOBAL, but not as IMPORTED.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
}
@@ -239,7 +239,7 @@ bool cmAddLibraryCommand
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
"in undefined behavior.";
- this->Makefile->IssueMessage(messageType, e.str().c_str());
+ this->Makefile->IssueMessage(messageType, e.str());
if (messageType == cmake::FATAL_ERROR)
{
@@ -250,9 +250,9 @@ bool cmAddLibraryCommand
if (isAlias)
{
- if(!cmGeneratorExpression::IsValidTargetName(libName.c_str()))
+ if(!cmGeneratorExpression::IsValidTargetName(libName))
{
- this->SetError(("Invalid name for ALIAS: " + libName).c_str());
+ this->SetError("Invalid name for ALIAS: " + libName);
return false;
}
if(excludeFromAll)
@@ -269,7 +269,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "ALIAS requires exactly one target argument.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
@@ -279,7 +279,7 @@ bool cmAddLibraryCommand
cmOStringStream e;
e << "cannot create ALIAS target \"" << libName
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
cmTarget *aliasedTarget =
@@ -290,7 +290,7 @@ bool cmAddLibraryCommand
e << "cannot create ALIAS target \"" << libName
<< "\" because target \"" << aliasedName << "\" does not already "
"exist.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
cmTarget::TargetType aliasedType = aliasedTarget->GetType();
@@ -303,7 +303,7 @@ bool cmAddLibraryCommand
cmOStringStream e;
e << "cannot create ALIAS target \"" << libName
<< "\" because target \"" << aliasedName << "\" is not a library.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
if(aliasedTarget->IsImported())
@@ -311,10 +311,10 @@ bool cmAddLibraryCommand
cmOStringStream e;
e << "cannot create ALIAS target \"" << libName
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
- this->Makefile->AddAlias(libName.c_str(), aliasedTarget);
+ this->Makefile->AddAlias(libName, aliasedTarget);
return true;
}
@@ -367,7 +367,7 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "Invalid name for IMPORTED INTERFACE library target: " << libName;
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
}
@@ -378,12 +378,12 @@ bool cmAddLibraryCommand
cmOStringStream e;
e << "cannot create imported target \"" << libName
<< "\" because another target with the same name already exists.";
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
// Create the imported target.
- this->Makefile->AddImportedTarget(libName.c_str(), type, importGlobal);
+ this->Makefile->AddImportedTarget(libName, type, importGlobal);
return true;
}
@@ -402,7 +402,7 @@ bool cmAddLibraryCommand
std::string msg;
if(!this->Makefile->EnforceUniqueName(libName, msg))
{
- this->SetError(msg.c_str());
+ this->SetError(msg);
return false;
}
}
@@ -416,11 +416,11 @@ bool cmAddLibraryCommand
{
cmOStringStream e;
e << "Invalid name for INTERFACE library target: " << libName;
- this->SetError(e.str().c_str());
+ this->SetError(e.str());
return false;
}
- this->Makefile->AddLibrary(libName.c_str(),
+ this->Makefile->AddLibrary(libName,
type,
srclists,
excludeFromAll);
@@ -442,7 +442,7 @@ bool cmAddLibraryCommand
++s;
}
- this->Makefile->AddLibrary(libName.c_str(), type, srclists, excludeFromAll);
+ this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll);
return true;
}