diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-16 04:57:53 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-18 22:07:02 (GMT) |
commit | d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af (patch) | |
tree | 2d563a0bbb66f63bc9e03b03fc3ff15cd14cbc02 /Source/cmTarget.h | |
parent | 820777af03041c21d7b36e80135382e7161c1ebd (diff) | |
download | CMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.zip CMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.tar.gz CMake-d7923b82ade9f84d0fc4c6d44b9719f2f7c0e9af.tar.bz2 |
Use std::unordered_map instead of hash_map where available.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index a032414..f43c87c 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -19,7 +19,11 @@ #include <cmsys/auto_ptr.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 #define CM_FOR_EACH_TARGET_POLICY(F) \ @@ -849,7 +853,11 @@ private: }; #ifdef CMAKE_BUILD_WITH_CMAKE -typedef cmsys::hash_map<std::string,cmTarget> cmTargets; +#ifdef CMake_HAVE_CXX11_UNORDERED_MAP +typedef std::unordered_map<std::string, cmTarget> cmTargets; +#else +typedef cmsys::hash_map<std::string, cmTarget> cmTargets; +#endif #else typedef std::map<std::string,cmTarget> cmTargets; #endif |