summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-16 04:57:53 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 22:07:02 (GMT)
commitd7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af (patch)
tree2d563a0bbb66f63bc9e03b03fc3ff15cd14cbc02 /Source/cmMakefile.h
parent820777af03041c21d7b36e80135382e7161c1ebd (diff)
downloadCMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.zip
CMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.tar.gz
CMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.tar.bz2
Use std::unordered_map instead of hash_map where available.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index e0eef6f..8271cc2 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -31,7 +31,11 @@
#include <cmsys/auto_ptr.hxx>
#include <cmsys/RegularExpression.hxx>
#if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <cmsys/hash_map.hxx>
+# ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+# include <unordered_map>
+# else
+# include <cmsys/hash_map.hxx>
+# endif
#endif
#include <stack>
@@ -868,7 +872,11 @@ protected:
// libraries, classes, and executables
mutable cmTargets Targets;
#if defined(CMAKE_BUILD_WITH_CMAKE)
+#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+ typedef std::unordered_map<std::string, cmTarget*> TargetMap;
+#else
typedef cmsys::hash_map<std::string, cmTarget*> TargetMap;
+#endif
#else
typedef std::map<std::string, cmTarget*> TargetMap;
#endif
@@ -1041,7 +1049,11 @@ private:
// A map for fast output to input look up.
#if defined(CMAKE_BUILD_WITH_CMAKE)
+#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+ typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap;
+#else
typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap;
+#endif
#else
typedef std::map<std::string, cmSourceFile*> OutputToSourceMap;
#endif