COMP: Using KWSys auto_ptr to avoid cross-platform problems.

This commit is contained in:
Brad King 2006-03-16 16:04:30 -05:00
parent 68ad66444b
commit f01bd91336

View File

@ -20,7 +20,7 @@
#include "cmGeneratedFileStream.h"
#include "cmake.h"
#include <memory> // auto_ptr
#include <cmsys/auto_ptr.hxx>
// cmExecutableCommand
bool cmExportLibraryDependenciesCommand::InitialPass(std::vector<std::string> const& args)
@ -57,16 +57,16 @@ void cmExportLibraryDependenciesCommand::FinalPass()
}
// Use copy-if-different if not appending.
std::auto_ptr<std::ofstream> foutPtr;
cmsys::auto_ptr<std::ofstream> foutPtr;
if(append)
{
std::auto_ptr<std::ofstream> ap(
cmsys::auto_ptr<std::ofstream> ap(
new std::ofstream(fname.c_str(), std::ios::app));
foutPtr = ap;
}
else
{
std::auto_ptr<cmGeneratedFileStream> ap(
cmsys::auto_ptr<cmGeneratedFileStream> ap(
new cmGeneratedFileStream(fname.c_str(), true));
ap->SetCopyIfDifferent(true);
foutPtr = ap;