diff options
author | Brad King <brad.king@kitware.com> | 2017-09-27 11:24:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-09-27 11:25:11 (GMT) |
commit | 068effa4d8ad2813499a6e79b056d79a2120e1ad (patch) | |
tree | 008fcbf88c2f6813542e83fb37a95e45c807b2d4 /Source/cmExportLibraryDependenciesCommand.cxx | |
parent | bb371753cb1d35c68060298ae5be6697144c9403 (diff) | |
parent | f0489856e30b1b5236d1897071ea38dfde438fc7 (diff) | |
download | CMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.zip CMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.tar.gz CMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.tar.bz2 |
Merge topic 'auto_ptr'
f0489856 Retire std::auto_ptr and its macro CM_AUTO_PTR
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1300
Diffstat (limited to 'Source/cmExportLibraryDependenciesCommand.cxx')
-rw-r--r-- | Source/cmExportLibraryDependenciesCommand.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index cf12d33..50f8cb0 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -4,8 +4,10 @@ #include "cmsys/FStream.hxx" #include <map> +#include <memory> // IWYU pragma: keep #include <utility> +#include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" @@ -13,7 +15,6 @@ #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" -#include "cm_auto_ptr.hxx" #include "cmake.h" class cmExecutionStatus; @@ -47,16 +48,15 @@ void cmExportLibraryDependenciesCommand::FinalPass() void cmExportLibraryDependenciesCommand::ConstFinalPass() const { // Use copy-if-different if not appending. - CM_AUTO_PTR<cmsys::ofstream> foutPtr; + std::unique_ptr<cmsys::ofstream> foutPtr; if (this->Append) { - CM_AUTO_PTR<cmsys::ofstream> ap( - new cmsys::ofstream(this->Filename.c_str(), std::ios::app)); - foutPtr = ap; + foutPtr = + cm::make_unique<cmsys::ofstream>(this->Filename.c_str(), std::ios::app); } else { - CM_AUTO_PTR<cmGeneratedFileStream> ap( + std::unique_ptr<cmGeneratedFileStream> ap( new cmGeneratedFileStream(this->Filename.c_str(), true)); ap->SetCopyIfDifferent(true); - foutPtr = ap; + foutPtr = std::move(ap); } std::ostream& fout = *foutPtr; |