|
|
@ -21,12 +21,12 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
FOREACH(header tr1/unordered_map unordered_map)
|
|
|
|
FOREACH(header tr1/unordered_map unordered_map)
|
|
|
|
FOREACH(namespace std::tr1 std )
|
|
|
|
FOREACH(namespace std::tr1 std )
|
|
|
|
IF(HAVE_HASH_MAP EQUAL 0 AND NOT STL_HASH_OLD_GCC)
|
|
|
|
IF(HAVE_HASH_MAP EQUAL 0 AND NOT STL_HASH_OLD_GCC)
|
|
|
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp")
|
|
|
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/testHashMap.cpp")
|
|
|
|
IF(CMAKE_CROSSCOMPILING)
|
|
|
|
IF(CMAKE_CROSSCOMPILING)
|
|
|
|
TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp")
|
|
|
|
TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_BINARY_DIR}/testHashMap.cpp")
|
|
|
|
SET(HASH_MAP_RUN_RESULT ${HASH_MAP_COMPILE_RESULT})
|
|
|
|
SET(HASH_MAP_RUN_RESULT ${HASH_MAP_COMPILE_RESULT})
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
TRY_RUN(HASH_MAP_RUN_RESULT HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp")
|
|
|
|
TRY_RUN(HASH_MAP_RUN_RESULT HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_BINARY_DIR}/testHashMap.cpp")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
IF (HASH_MAP_COMPILE_RESULT AND HASH_MAP_RUN_RESULT EQUAL 1)
|
|
|
|
IF (HASH_MAP_COMPILE_RESULT AND HASH_MAP_RUN_RESULT EQUAL 1)
|
|
|
|
SET(HASH_MAP_H <${header}>)
|
|
|
|
SET(HASH_MAP_H <${header}>)
|
|
|
@ -45,8 +45,8 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
FOREACH(header ext/hash_map hash_map)
|
|
|
|
FOREACH(header ext/hash_map hash_map)
|
|
|
|
FOREACH(namespace __gnu_cxx "" std stdext)
|
|
|
|
FOREACH(namespace __gnu_cxx "" std stdext)
|
|
|
|
IF (HAVE_HASH_MAP EQUAL 0)
|
|
|
|
IF (HAVE_HASH_MAP EQUAL 0)
|
|
|
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp")
|
|
|
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/testHashMap.cpp")
|
|
|
|
TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_SOURCE_DIR}/testHashMap.cpp")
|
|
|
|
TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_BINARY_DIR}/testHashMap.cpp")
|
|
|
|
IF (HASH_MAP_COMPILE_RESULT)
|
|
|
|
IF (HASH_MAP_COMPILE_RESULT)
|
|
|
|
SET(HASH_MAP_H <${header}>)
|
|
|
|
SET(HASH_MAP_H <${header}>)
|
|
|
|
STRING(REPLACE "map" "set" HASH_SET_H ${HASH_MAP_H})
|
|
|
|
STRING(REPLACE "map" "set" HASH_SET_H ${HASH_MAP_H})
|
|
|
|