Use std::unordered_map instead of hash_map where available.

This commit is contained in:
Stephen Kelly
2015-05-16 06:57:53 +02:00
parent 820777af03
commit d7923b82ad
9 changed files with 85 additions and 5 deletions
+8 -1
View File
@@ -14,8 +14,12 @@
#include "cmStandardIncludes.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
#include <unordered_map>
#else
#include "cmsys/hash_map.hxx"
#endif
#endif
#include <list>
@@ -65,9 +69,12 @@ private:
};
static Def NoDef;
// Local definitions, set or unset.
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
typedef std::unordered_map<std::string, Def> MapType;
#else
typedef cmsys::hash_map<std::string, Def> MapType;
#endif
#else
typedef std::map<std::string, Def> MapType;
#endif