[Cmake-commits] CMake branch, next, updated. v3.6.2-2472-gfaf942d
Brad King
brad.king at kitware.com
Mon Sep 26 09:04:13 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via faf942d8f24416635e776aec909ba356b2cd1d9e (commit)
via e6380b11e9d900c9b60ad6fbd46171092bf0136e (commit)
via 67480c05e3f6819d867680775ca0cbc6f03f28da (commit)
from ccf06ce07151b3e67e8673976d74f03a081eb9de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=faf942d8f24416635e776aec909ba356b2cd1d9e
commit faf942d8f24416635e776aec909ba356b2cd1d9e
Merge: ccf06ce e6380b1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 09:04:12 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 26 09:04:12 2016 -0400
Merge topic 'auto-ptr' into next
e6380b11 Use std::auto_ptr on compilers that do not warn about it
67480c05 Add a feature check to test availability of auto_ptr
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6380b11e9d900c9b60ad6fbd46171092bf0136e
commit e6380b11e9d900c9b60ad6fbd46171092bf0136e
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Sep 23 21:56:34 2016 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 26 09:03:46 2016 -0400
Use std::auto_ptr on compilers that do not warn about it
diff --git a/Source/cm_auto_ptr.hxx b/Source/cm_auto_ptr.hxx
index f6c4362..f38eda5 100644
--- a/Source/cm_auto_ptr.hxx
+++ b/Source/cm_auto_ptr.hxx
@@ -14,7 +14,13 @@
#include <cmConfigure.h>
-// FIXME: Use std::auto_ptr on compilers that do not warn about it.
+#ifdef CMake_HAVE_CXX_AUTO_PTR
+
+#include <memory>
+#define CM_AUTO_PTR std::auto_ptr
+
+#else
+
#define CM_AUTO_PTR cm::auto_ptr
// The HP compiler cannot handle the conversions necessary to use
@@ -219,3 +225,5 @@ public:
#endif
#endif
+
+#endif
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67480c05e3f6819d867680775ca0cbc6f03f28da
commit 67480c05e3f6819d867680775ca0cbc6f03f28da
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Sep 23 21:49:12 2016 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 26 09:03:46 2016 -0400
Add a feature check to test availability of auto_ptr
diff --git a/Source/Checks/cm_cxx_auto_ptr.cxx b/Source/Checks/cm_cxx_auto_ptr.cxx
new file mode 100644
index 0000000..d3100fd
--- /dev/null
+++ b/Source/Checks/cm_cxx_auto_ptr.cxx
@@ -0,0 +1,18 @@
+#include <memory>
+
+std::auto_ptr<int> get_auto_ptr()
+{
+ std::auto_ptr<int> ptr;
+ ptr = std::auto_ptr<int>(new int(0));
+ return ptr;
+}
+
+int use_auto_ptr(std::auto_ptr<int> ptr)
+{
+ return *ptr;
+}
+
+int main()
+{
+ return use_auto_ptr(get_auto_ptr());
+}
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index c6a532f..80c9f3b 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -32,6 +32,7 @@ function(cm_check_cxx_feature name)
endfunction()
if(CMAKE_CXX_STANDARD)
+ cm_check_cxx_feature(auto_ptr)
cm_check_cxx_feature(make_unique)
if(CMake_HAVE_CXX_MAKE_UNIQUE)
set(CMake_HAVE_CXX_UNIQUE_PTR 1)
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 8365367..8a1e81f 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -30,6 +30,7 @@
#cmakedefine CMAKE_USE_MACH_PARSER
#cmakedefine CMAKE_USE_LIBUV
#cmakedefine CMAKE_ENCODING_UTF8
+#cmakedefine CMake_HAVE_CXX_AUTO_PTR
#cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE
#cmakedefine CMake_HAVE_CXX_NULLPTR
#cmakedefine CMake_HAVE_CXX_OVERRIDE
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list