summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.h
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 21:52:51 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-24 13:58:52 (GMT)
commit1a74e719068c97518d6f9521c86862a17166f32e (patch)
tree2f45312d552f2cc383871fff6ef1cd0cef847151 /Source/cmDefinitions.h
parent1e555a44aa4e3d40bca2f88915c9f957098e5a55 (diff)
downloadCMake-1a74e719068c97518d6f9521c86862a17166f32e.zip
CMake-1a74e719068c97518d6f9521c86862a17166f32e.tar.gz
CMake-1a74e719068c97518d6f9521c86862a17166f32e.tar.bz2
Introduce CM_UNORDERED_MAP
Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and std::map.
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r--Source/cmDefinitions.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 569b3a2..8dfb9ea 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -6,20 +6,11 @@
#include <cmConfigure.h>
#include "cmLinkedTree.h"
+#include "cm_unordered_map.hxx"
#include <string>
#include <vector>
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#ifdef CMake_HAVE_CXX_UNORDERED_MAP
-#include <unordered_map>
-#else
-#include "cmsys/hash_map.hxx"
-#endif
-#else
-#include <map>
-#endif
-
/** \class cmDefinitions
* \brief Store a scope of variable definitions for CMake language.
*
@@ -85,15 +76,7 @@ private:
};
static Def NoDef;
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#ifdef CMake_HAVE_CXX_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
+ typedef CM_UNORDERED_MAP<std::string, Def> MapType;
MapType Map;
static Def const& GetInternal(const std::string& key, StackIter begin,