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  f090b7818791116d3bd273403a91531e9a14d3fc (commit)
       via  4d7002fe4045e32dc3e5eefaff9ab2f20c878297 (commit)
      from  2969f55026a2bb77f063c6c119a9c9e3afc35854 (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=f090b7818791116d3bd273403a91531e9a14d3fc
commit f090b7818791116d3bd273403a91531e9a14d3fc
Merge: 2969f55 4d7002f
Author:     Daniel Pfeifer <dan...@pfeifer-mail.de>
AuthorDate: Thu Dec 29 15:19:29 2016 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Dec 29 15:19:29 2016 -0500

    Merge topic 'require-tr1' into next
    
    4d7002fe Revert "Require TR1"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d7002fe4045e32dc3e5eefaff9ab2f20c878297
commit 4d7002fe4045e32dc3e5eefaff9ab2f20c878297
Author:     Daniel Pfeifer <dan...@pfeifer-mail.de>
AuthorDate: Thu Dec 29 21:18:44 2016 +0100
Commit:     Daniel Pfeifer <dan...@pfeifer-mail.de>
CommitDate: Thu Dec 29 21:18:44 2016 +0100

    Revert "Require TR1"
    
    This reverts commit b0c31f93c84207b3c3a8ba31241ff2ee22886acf.

diff --git a/Source/Checks/cm_cxx_features.cmake 
b/Source/Checks/cm_cxx_features.cmake
index 23805be..80c9f3b 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -40,4 +40,6 @@ if(CMAKE_CXX_STANDARD)
   cm_check_cxx_feature(nullptr)
   cm_check_cxx_feature(override)
   cm_check_cxx_feature(unique_ptr)
+  cm_check_cxx_feature(unordered_map)
+  cm_check_cxx_feature(unordered_set)
 endif()
diff --git a/Source/Checks/cm_cxx_unordered_map.cxx 
b/Source/Checks/cm_cxx_unordered_map.cxx
new file mode 100644
index 0000000..be3de25
--- /dev/null
+++ b/Source/Checks/cm_cxx_unordered_map.cxx
@@ -0,0 +1,7 @@
+#include <unordered_map>
+int main()
+{
+  std::unordered_map<int, int> map;
+  map[0] = 0;
+  return 0;
+}
diff --git a/Source/Checks/cm_cxx_unordered_set.cxx 
b/Source/Checks/cm_cxx_unordered_set.cxx
new file mode 100644
index 0000000..de4bb77
--- /dev/null
+++ b/Source/Checks/cm_cxx_unordered_set.cxx
@@ -0,0 +1,7 @@
+#include <unordered_set>
+int main()
+{
+  std::unordered_set<int> set;
+  set.insert(0);
+  return 0;
+}
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 07eba12..26f1df2 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -25,6 +25,8 @@
 #cmakedefine CMake_HAVE_CXX_NULLPTR
 #cmakedefine CMake_HAVE_CXX_OVERRIDE
 #cmakedefine CMake_HAVE_CXX_UNIQUE_PTR
+#cmakedefine CMake_HAVE_CXX_UNORDERED_MAP
+#cmakedefine CMake_HAVE_CXX_UNORDERED_SET
 #define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
 #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
 
diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx
index 3a0d88a..dc8ca35 100644
--- a/Source/cm_unordered_map.hxx
+++ b/Source/cm_unordered_map.hxx
@@ -4,29 +4,22 @@
 #define CM_UNORDERED_MAP_HXX
 
 #include <cmConfigure.h>
-#include <cstddef>
 
-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)
-#include <tr1/unordered_map>
-#else
-#include <unordered_map>
-#endif
+#if defined(CMake_HAVE_CXX_UNORDERED_MAP)
 
-namespace cm {
+#include <unordered_map>
+#define CM_UNORDERED_MAP std::unordered_map
 
-#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||                            \
-  (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L))
+#elif defined(CMAKE_BUILD_WITH_CMAKE)
 
-using namespace std::tr1;
+#include <cmsys/hash_map.hxx>
+#define CM_UNORDERED_MAP cmsys::hash_map
 
 #else
 
-using namespace std;
+#include <map>
+#define CM_UNORDERED_MAP std::map
 
 #endif
 
-} // end namespace cm
-
-#define CM_UNORDERED_MAP cm::unordered_map
-
 #endif
diff --git a/Source/cm_unordered_set.hxx b/Source/cm_unordered_set.hxx
index 1f66e00..ce58dbf 100644
--- a/Source/cm_unordered_set.hxx
+++ b/Source/cm_unordered_set.hxx
@@ -4,29 +4,22 @@
 #define CM_UNORDERED_SET_HXX
 
 #include <cmConfigure.h>
-#include <cstddef>
 
-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)
-#include <tr1/unordered_set>
-#else
-#include <unordered_set>
-#endif
+#if defined(CMake_HAVE_CXX_UNORDERED_SET)
 
-namespace cm {
+#include <unordered_set>
+#define CM_UNORDERED_SET std::unordered_set
 
-#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||                            \
-  (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L))
+#elif defined(CMAKE_BUILD_WITH_CMAKE)
 
-using namespace std::tr1;
+#include <cmsys/hash_set.hxx>
+#define CM_UNORDERED_SET cmsys::hash_set
 
 #else
 
-using namespace std;
+#include <set>
+#define CM_UNORDERED_SET std::set
 
 #endif
 
-} // end namespace cm
-
-#define CM_UNORDERED_SET cm::unordered_set
-
 #endif

-----------------------------------------------------------------------

Summary of changes:
 Source/Checks/cm_cxx_features.cmake    |    2 ++
 Source/Checks/cm_cxx_unordered_map.cxx |    7 +++++++
 Source/Checks/cm_cxx_unordered_set.cxx |    7 +++++++
 Source/cmConfigure.cmake.h.in          |    2 ++
 Source/cm_unordered_map.hxx            |   23 ++++++++---------------
 Source/cm_unordered_set.hxx            |   23 ++++++++---------------
 6 files changed, 34 insertions(+), 30 deletions(-)
 create mode 100644 Source/Checks/cm_cxx_unordered_map.cxx
 create mode 100644 Source/Checks/cm_cxx_unordered_set.cxx


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to