summaryrefslogtreecommitdiffstats
path: root/Source/cmFileTimeComparison.cxx
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/cmFileTimeComparison.cxx
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/cmFileTimeComparison.cxx')
-rw-r--r--Source/cmFileTimeComparison.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 5727470..13e2a66 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -13,8 +13,12 @@
// Use a hash table to avoid duplicate file time checks from disk.
#if defined(CMAKE_BUILD_WITH_CMAKE)
+#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+#include <unordered_map>
+#else
# include <cmsys/hash_map.hxx>
#endif
+#endif
#include <cmsys/Encoding.hxx>
@@ -47,9 +51,17 @@ private:
{
return h(s.c_str());
}
+#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+ std::hash<const char*> h;
+#else
cmsys::hash<const char*> h;
+#endif
};
+#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
+ typedef std::unordered_map<std::string,
+#else
typedef cmsys::hash_map<std::string,
+#endif
cmFileTimeComparison_Type, HashString> FileStatsMap;
FileStatsMap Files;
#endif