summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-27 18:34:25 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-27 18:34:25 (GMT)
commit4046fc01041e1bd9ece928bd77d494c38cc0c70a (patch)
tree24caba4fca595db4f1743faa54da562899bc6320 /Source
parent9e395feb466145617376eae4013755f684be3f80 (diff)
parentddc052052b05d6daea0791efd2e1b97a9349a5e9 (diff)
downloadCMake-4046fc01041e1bd9ece928bd77d494c38cc0c70a.zip
CMake-4046fc01041e1bd9ece928bd77d494c38cc0c70a.tar.gz
CMake-4046fc01041e1bd9ece928bd77d494c38cc0c70a.tar.bz2
Merge topic 'use-cmsys-auto_ptr'
ddc0520 Always use the auto_ptr from cmsys.
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx3
-rw-r--r--Source/CPack/cpack.cxx3
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx3
-rw-r--r--Source/cmGraphVizWriter.cxx4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx1
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx2
-rw-r--r--Source/cmSystemTools.cxx1
-rw-r--r--Source/cmake.cxx18
8 files changed, 12 insertions, 23 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 6317fa0..7cc1522 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -23,7 +23,6 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Glob.hxx>
-#include <memory> // auto_ptr
#include <algorithm>
#if defined(__HAIKU__)
@@ -696,7 +695,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
std::string realInstallDirectory = tempInstallDirectory;
if ( !installSubDirectory.empty() && installSubDirectory != "/" )
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index b603585..0ba7322 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -27,7 +27,6 @@
#include <cmsys/CommandLineArguments.hxx>
#include <cmsys/SystemTools.hxx>
-#include <memory> // auto_ptr
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][3] =
@@ -276,7 +275,7 @@ int main (int argc, char *argv[])
cminst.RemoveUnscriptableCommands();
cmGlobalGenerator cmgg;
cmgg.SetCMakeInstance(&cminst);
- std::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
cmMakefile* globalMF = cmlg->GetMakefile();
bool cpackConfigFileSpecified = true;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b796b83..e7491bb 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -32,7 +32,6 @@
#include <math.h>
#include <float.h>
-#include <memory> // auto_ptr
#include <set>
//----------------------------------------------------------------------
@@ -1547,7 +1546,7 @@ void cmCTestTestHandler::GetListOfTests()
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
this->CTest->GetConfigType().c_str());
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 15bad52..4816da9 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -15,8 +15,6 @@
#include "cmGlobalGenerator.h"
#include "cmGeneratedFileStream.h"
-#include <memory>
-
static const char* getShapeForTarget(const cmTarget* target)
@@ -67,7 +65,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
cmake cm;
cmGlobalGenerator ggi;
ggi.SetCMakeInstance(&cm);
- std::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
const char* inFileName = settingsFileName;
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 820d25a..d629e71 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -32,7 +32,6 @@
#include <cmsys/auto_ptr.hxx>
-#include <memory> // auto_ptr
#include <queue>
//----------------------------------------------------------------------------
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index e7004d6..5b4e4d7 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -19,8 +19,6 @@
#include "cmTarget.h"
#include "cmake.h"
-#include <memory> // auto_ptr
-
//----------------------------------------------------------------------------
cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmTarget* target):
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 544f7e4..c2521d9 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -52,7 +52,6 @@
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <memory> // auto_ptr
# include <fcntl.h>
# include "cmCryptoHash.h"
#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 1ec88fb..1424a11 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -110,8 +110,6 @@
#include <sys/stat.h> // struct stat
-#include <memory> // auto_ptr
-
static bool cmakeCheckStampFile(const char* stampName);
static bool cmakeCheckStampList(const char* stampName);
@@ -519,7 +517,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
// read in the list file to fill the cache
if(path)
{
- std::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
lg->GetMakefile()->SetHomeOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
lg->GetMakefile()->SetStartOutputDirectory
@@ -558,7 +556,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
this->SetGlobalGenerator(gg);
// read in the list file to fill the cache
- std::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
mf->SetHomeOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
@@ -1654,7 +1652,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen.c_str()))
{
cm.SetGlobalGenerator(ggd);
- std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
lgd->GetMakefile()->SetStartDirectory(startDir.c_str());
lgd->GetMakefile()->SetStartOutputDirectory(startOutDir.c_str());
lgd->GetMakefile()->MakeStartDirectoriesCurrent();
@@ -2794,7 +2792,7 @@ int cmake::CheckBuildSystem()
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
if(!mf->ReadListFile(0, this->CheckBuildSystemArgument.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
@@ -2820,11 +2818,11 @@ int cmake::CheckBuildSystem()
}
// Create the generator and use it to clear the dependencies.
- std::auto_ptr<cmGlobalGenerator>
+ cmsys::auto_ptr<cmGlobalGenerator>
ggd(this->CreateGlobalGenerator(genName));
if(ggd.get())
{
- std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
lgd->ClearDependencies(mf, verbose);
}
}
@@ -3067,7 +3065,7 @@ void cmake::MarkCliAsUsed(const std::string& variable)
void cmake::GenerateGraphViz(const char* fileName) const
{
#ifdef CMAKE_BUILD_WITH_CMAKE
- std::auto_ptr<cmGraphVizWriter> gvWriter(
+ cmsys::auto_ptr<cmGraphVizWriter> gvWriter(
new cmGraphVizWriter(this->GetGlobalGenerator()->GetLocalGenerators()));
std::string settingsFile = this->GetHomeOutputDirectory();
@@ -4466,7 +4464,7 @@ int cmake::Build(const std::string& dir,
std::cerr << "Error: could find generator in Cache\n";
return 1;
}
- std::auto_ptr<cmGlobalGenerator> gen(
+ cmsys::auto_ptr<cmGlobalGenerator> gen(
this->CreateGlobalGenerator(it.GetValue()));
std::string output;
std::string projName;