1 # - Check if for hash_map.
5 include(CheckCXXSourceCompiles)
8 message(STATUS "Checking for C++ hash_map implementation...")
9 check_cxx_source_compiles("
10 #include <ext/hash_map>
12 __gnu_cxx::hash_map<int, int> t;
17 if(HAVE_GNU_EXT_HASH_MAP)
18 message(STATUS "C++ hash_map found in 'ext' dir in namespace __gnu_cxx::")
19 endif(HAVE_GNU_EXT_HASH_MAP)
21 check_cxx_source_compiles("
22 #include <ext/hash_map>
24 std::hash_map<int, int> t;
29 if(HAVE_STD_EXT_HASH_MAP)
30 message(STATUS "C++ hash_map found in 'ext' dir in namespace std::")
31 endif(HAVE_STD_EXT_HASH_MAP)
33 check_cxx_source_compiles("
41 if(HAVE_GLOBAL_HASH_MAP)
42 message(STATUS "C++ hash_map found in global namespace")
43 endif(HAVE_GLOBAL_HASH_MAP)
45 if(NOT HAVE_GNU_EXT_HASH_MAP)
46 if(NOT HAVE_STD_EXT_HASH_MAP)
47 if(NOT HAVE_GLOBAL_HASH_MAP)
48 message(STATUS "C++ hash_map not found")
49 endif(NOT HAVE_GLOBAL_HASH_MAP)
50 endif(NOT HAVE_STD_EXT_HASH_MAP)
51 endif(NOT HAVE_GNU_EXT_HASH_MAP)
53 endmacro(CHECK_HASHMAP)