1 # - Test for std:: namespace support
2 # check if the compiler supports std:: on stl classes
3 # CMAKE_NO_STD_NAMESPACE - defined by the results
5 IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
6 MESSAGE(STATUS "Check for STD namespace")
7 TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR}
8 ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx
9 OUTPUT_VARIABLE OUTPUT)
10 IF (CMAKE_STD_NAMESPACE)
11 MESSAGE(STATUS "Check for STD namespace - found")
12 SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
13 "Does the compiler support std::.")
14 FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
15 "Determining if the CXX compiler has std namespace passed with "
16 "the following output:\n${OUTPUT}\n\n")
17 ELSE (CMAKE_STD_NAMESPACE)
18 MESSAGE(STATUS "Check for STD namespace - not found")
19 SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL
20 "Does the compiler support std::.")
21 FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
22 "Determining if the CXX compiler has std namespace failed with "
23 "the following output:\n${OUTPUT}\n\n")
24 ENDIF (CMAKE_STD_NAMESPACE)
25 ENDIF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")