summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-12 13:57:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-12 13:57:39 (GMT)
commitb5a467262b61065ed5d1b8d545cc2ade548b9d0b (patch)
tree8aa5908e3731be5fcf097de849fef3a432388162 /Source/cmTarget.cxx
parent6c61ffaf9b1616e6938b78ca19f17f9a9f87f3ec (diff)
parent0f7bdd61da51ea8609246fe6fd05a13235fe75db (diff)
downloadCMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.zip
CMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.tar.gz
CMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.tar.bz2
Merge topic 'drop-ancient-workarounds'
0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx76
1 files changed, 38 insertions, 38 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d454e89..c7b2715 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -682,7 +682,7 @@ static bool processSources(cmTarget const* tgt,
if (!targetName.empty() && !cmSystemTools::FileIsFullPath(src.c_str()))
{
- cmOStringStream err;
+ std::ostringstream err;
if (!targetName.empty())
{
err << "Target \"" << targetName << "\" contains relative "
@@ -859,7 +859,7 @@ cmTarget::GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const
thisConfigFiles += (*fi)->GetFullPath();
sep = "\n ";
}
- cmOStringStream e;
+ std::ostringstream e;
e << "Target \"" << this->Name << "\" has source files which vary by "
"configuration. This is not supported by the \""
<< this->Makefile->GetLocalGenerator()
@@ -992,7 +992,7 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s)
this->Makefile->ExpandVariablesInString(src);
if (src != s)
{
- cmOStringStream e;
+ std::ostringstream e;
bool noMessage = false;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0049))
@@ -1275,7 +1275,7 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature)
}
//----------------------------------------------------------------------------
-void cmTarget::GetTllSignatureTraces(cmOStringStream &s,
+void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
TLLSignature sig) const
{
std::vector<cmListFileBacktrace> sigs;
@@ -1303,7 +1303,7 @@ void cmTarget::GetTllSignatureTraces(cmOStringStream &s,
if(i != it->end())
{
cmListFileContext const& lfc = *i;
- cmOStringStream line;
+ std::ostringstream line;
line << " * " << (lfc.Line? "": " in ") << lfc << std::endl;
if (emitted.insert(line.str()).second)
{
@@ -1737,7 +1737,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
if (this->GetType() == INTERFACE_LIBRARY
&& !whiteListedInterfaceProperty(prop))
{
- cmOStringStream e;
+ std::ostringstream e;
e << "INTERFACE_LIBRARY targets may only have whitelisted properties. "
"The property \"" << prop << "\" is not allowed.";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1745,7 +1745,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
}
else if (prop == "NAME")
{
- cmOStringStream e;
+ std::ostringstream e;
e << "NAME property is read-only\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
@@ -1788,7 +1788,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
}
else if(prop == "EXPORT_NAME" && this->IsImported())
{
- cmOStringStream e;
+ std::ostringstream e;
e << "EXPORT_NAME property can't be set on imported targets (\""
<< this->Name << "\")\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1804,7 +1804,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
{
if(this->IsImported())
{
- cmOStringStream e;
+ std::ostringstream e;
e << "SOURCES property can't be set on imported targets (\""
<< this->Name << "\")\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1832,7 +1832,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
if (this->GetType() == INTERFACE_LIBRARY
&& !whiteListedInterfaceProperty(prop))
{
- cmOStringStream e;
+ std::ostringstream e;
e << "INTERFACE_LIBRARY targets may only have whitelisted properties. "
"The property \"" << prop << "\" is not allowed.";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1840,7 +1840,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
}
else if (prop == "NAME")
{
- cmOStringStream e;
+ std::ostringstream e;
e << "NAME property is read-only\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
@@ -1875,7 +1875,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
}
else if(prop == "EXPORT_NAME" && this->IsImported())
{
- cmOStringStream e;
+ std::ostringstream e;
e << "EXPORT_NAME property can't be set on imported targets (\""
<< this->Name << "\")\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1890,7 +1890,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
{
if(this->IsImported())
{
- cmOStringStream e;
+ std::ostringstream e;
e << "SOURCES property can't be set on imported targets (\""
<< this->Name << "\")\n";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -1919,7 +1919,7 @@ std::string cmTarget::GetExportName() const
{
if (!cmGeneratorExpression::IsValidTargetName(exportName))
{
- cmOStringStream e;
+ std::ostringstream e;
e << "EXPORT_NAME property \"" << exportName << "\" for \""
<< this->GetName() << "\": is not valid.";
cmSystemTools::Error(e.str().c_str());
@@ -2031,7 +2031,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
if (fromImported
&& !cmSystemTools::FileExists(li->c_str()))
{
- cmOStringStream e;
+ std::ostringstream e;
cmake::MessageType messageType = cmake::FATAL_ERROR;
if (checkCMP0027)
{
@@ -2064,7 +2064,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
if (!cmSystemTools::FileIsFullPath(li->c_str()))
{
- cmOStringStream e;
+ std::ostringstream e;
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
if (!targetName.empty())
@@ -2414,7 +2414,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
{
case cmPolicies::WARN:
{
- cmOStringStream e;
+ std::ostringstream e;
e << this->Makefile->GetCMakeInstance()->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0043);
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
@@ -2547,7 +2547,7 @@ static void cmTargetCheckLINK_INTERFACE_LIBRARIES(
"LINK_INTERFACE_LIBRARIES");
// Report an error.
- cmOStringStream e;
+ std::ostringstream e;
e << "Property " << prop << " may not contain link-type keyword \""
<< keys.match(2) << "\". "
<< "The " << base << " property has a per-configuration "
@@ -2584,7 +2584,7 @@ static void cmTargetCheckINTERFACE_LINK_LIBRARIES(const char* value,
}
// Report an error.
- cmOStringStream e;
+ std::ostringstream e;
e << "Property INTERFACE_LINK_LIBRARIES may not contain link-type "
"keyword \"" << keys.match(2) << "\". The INTERFACE_LINK_LIBRARIES "
@@ -2883,7 +2883,7 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
{
return true;
}
- cmOStringStream e;
+ std::ostringstream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch (context->GetPolicyStatus(cmPolicies::CMP0026))
@@ -2942,7 +2942,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
if (this->GetType() == INTERFACE_LIBRARY
&& !whiteListedInterfaceProperty(prop))
{
- cmOStringStream e;
+ std::ostringstream e;
e << "INTERFACE_LIBRARY targets may only have whitelisted properties. "
"The property \"" << prop << "\" is not allowed.";
context->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -3118,7 +3118,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
return 0;
}
- cmOStringStream ss;
+ std::ostringstream ss;
const char* sep = "";
typedef cmTargetInternals::TargetPropertyEntry
TargetPropertyEntry;
@@ -3148,7 +3148,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
bool addContent = false;
bool noMessage = true;
- cmOStringStream e;
+ std::ostringstream e;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(context->GetPolicyStatus(cmPolicies::CMP0051))
{
@@ -3246,7 +3246,7 @@ public:
{
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
- cmOStringStream e;
+ std::ostringstream e;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0028))
{
case cmPolicies::WARN:
@@ -3367,7 +3367,7 @@ public:
}
else if(this->Preferred.size() > 1)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Target " << this->Target->GetName()
<< " contains multiple languages with the highest linker preference"
<< " (" << this->Preference << "):\n";
@@ -3739,7 +3739,7 @@ bool cmTarget::HasMacOSXRpathInstallNameDir(const std::string& config) const
if(!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG"))
{
- cmOStringStream w;
+ std::ostringstream w;
w << "Attempting to use";
if(macosx_rpath)
{
@@ -5037,7 +5037,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
report += compatibilityAgree(t, propContent != consistent.second);
if (!consistent.first)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Property " << p << " on target \""
<< tgt->GetName() << "\" does\nnot match the "
"INTERFACE_" << p << " property requirement\nof "
@@ -5070,7 +5070,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
report += compatibilityAgree(t, propContent != consistent.second);
if (!consistent.first)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Property " << p << " on target \""
<< tgt->GetName() << "\" is\nimplied to be " << defaultValue
<< " because it was used to determine the link libraries\n"
@@ -5104,7 +5104,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
report += compatibilityAgree(t, propContent != consistent.second);
if (!consistent.first)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "The INTERFACE_" << p << " property of \""
<< theTarget->GetName() << "\" does\nnot agree with the value "
"of " << p << " already determined\nfor \""
@@ -6012,7 +6012,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
if (newExplicitLibraries
&& strcmp(newExplicitLibraries, explicitLibraries) != 0)
{
- cmOStringStream w;
+ std::ostringstream w;
w <<
(thisTarget->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
@@ -6099,7 +6099,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
if(newLibraries.empty())
{ newLibraries = "(empty)"; }
- cmOStringStream w;
+ std::ostringstream w;
w <<
(thisTarget->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
@@ -6354,7 +6354,7 @@ cmTargetInternals::ComputeLinkImplementationLibraries(
{
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
- cmOStringStream e;
+ std::ostringstream e;
switch(thisTarget->GetPolicyStatusCMP0038())
{
case cmPolicies::WARN:
@@ -6457,7 +6457,7 @@ cmTarget const* cmTarget::FindTargetToLink(std::string const& name) const
if(tgt && tgt->GetType() == cmTarget::OBJECT_LIBRARY)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Target \"" << this->GetName() << "\" links to "
"OBJECT library \"" << tgt->GetName() << "\" but this is not "
"allowed. "
@@ -6496,7 +6496,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
{
case cmPolicies::WARN:
{
- cmOStringStream w;
+ std::ostringstream w;
w << (this->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0004)) << "\n"
<< "Target \"" << this->GetName() << "\" links to item \""
@@ -6508,7 +6508,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
break;
case cmPolicies::NEW:
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Target \"" << this->GetName() << "\" links to item \""
<< item << "\" which has leading or trailing whitespace. "
<< "This is now an error according to policy CMP0004.";
@@ -6518,7 +6518,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS:
{
- cmOStringStream e;
+ std::ostringstream e;
e << (this->Makefile->GetPolicies()
->GetRequiredPolicyError(cmPolicies::CMP0004)) << "\n"
<< "Target \"" << this->GetName() << "\" links to item \""
@@ -6599,7 +6599,7 @@ void checkPropertyConsistency(cmTarget const* depender,
std::string pfile = pdir + pname + ".rst";
if(cmSystemTools::FileExists(pfile.c_str(), true))
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Target \"" << dependee->GetName() << "\" has property \""
<< *pi << "\" listed in its " << propName << " property. "
"This is not allowed. Only user-defined properties may appear "
@@ -6761,7 +6761,7 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
{
propsString += " and the " + *props.begin();
}
- cmOStringStream e;
+ std::ostringstream e;
e << "Property \"" << prop << "\" appears in both the "
<< propsString <<
" property in the dependencies of target \"" << this->GetName() <<