OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / share / CMake / Modules / TestForSTDNamespace.cmake
1 #
2 # check if the compiler supports std:: on stl classes
3 #
4 # CMAKE_NO_STD_NAMESPACE - defined accoreding to the results
5 #
6 IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
7   MESSAGE(STATUS "Check for STD namespace")
8   TRY_COMPILE(CMAKE_STD_NAMESPACE  ${CMAKE_BINARY_DIR} 
9     ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx
10     OUTPUT_VARIABLE OUTPUT)
11   IF (CMAKE_STD_NAMESPACE)
12     MESSAGE(STATUS "Check for STD namespace - found")
13     SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL 
14          "Does the compiler support std::.")
15     FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
16       "Determining if the CXX compiler has std namespace passed with "
17       "the following output:\n${OUTPUT}\n\n")
18   ELSE (CMAKE_STD_NAMESPACE)
19     MESSAGE(STATUS "Check for STD namespace - not found")
20     SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL 
21        "Does the compiler support std::.")
22     FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
23       "Determining if the CXX compiler has std namespace failed with "
24       "the following output:\n${OUTPUT}\n\n")
25   ENDIF (CMAKE_STD_NAMESPACE)
26 ENDIF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
27
28
29
30