summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-06-19 19:21:49 (GMT)
committerBrad King <brad.king@kitware.com>2002-06-19 19:21:49 (GMT)
commit07d35e662dc76fa7702d54f4a9b3ced3dac3c969 (patch)
tree9cde169f2d59b54ac0a779e0ef55d6260452f84c /Source/cmUnixMakefileGenerator.cxx
parent27a2cad0fcaa0c3733c0adf532d59df7ba3cde29 (diff)
downloadCMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.zip
CMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.tar.gz
CMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.tar.bz2
ENH: Added cmStringStream class to wrap std::stringstream or std::strstream depending on the platform. The interface is that of std::stringstream, so no "ends" or "rdbuf()->freeze(0)" lines are needed.
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 31e5085..c8ed941 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -655,11 +655,9 @@ void cmUnixMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
libName = this->ConvertToOutputPath(libName.c_str());
command2 += libName + " \\\n";
command2 += "\t $(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
- std::strstream linklibs;
+ cmStringStream linklibs;
this->OutputLinkLibraries(linklibs, name, t);
- linklibs << std::ends;
command2 += linklibs.str();
- delete [] linklibs.str();
std::string customCommands = this->CreateTargetRules(t, name);
const char* cc = 0;
if(customCommands.size() > 0)
@@ -699,11 +697,9 @@ void cmUnixMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout,
libName = this->ConvertToOutputPath(libName.c_str());
command2 += libName + " \\\n";
command2 += "\t $(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
- std::strstream linklibs;
+ cmStringStream linklibs;
this->OutputLinkLibraries(linklibs, std::string(name).c_str(), t);
- linklibs << std::ends;
command2 += linklibs.str();
- delete [] linklibs.str();
std::string customCommands = this->CreateTargetRules(t, name);
const char* cc = 0;
if(customCommands.size() > 0)
@@ -778,9 +774,8 @@ void cmUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
"$(CMAKE_C_COMPILER) $(CMAKE_C_SHLIB_LINK_FLAGS) $(CMAKE_C_FLAGS) ";
}
command += "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
- std::strstream linklibs;
+ cmStringStream linklibs;
this->OutputLinkLibraries(linklibs, 0, t);
- linklibs << std::ends;
command += linklibs.str();
std::string outputFile = m_ExecutableOutputPath + name;
command += " -o " + this->ConvertToOutputPath(outputFile.c_str());