STYLE: Nightly Version update
[cmake.git] / Modules / TestForANSIForScope.cmake
blobc48a16a61f935b895327b7f21df845b7944469cd
2 # check if the compiler supports std:: on stl classes
4 # CMAKE_NO_STD_NAMESPACE - defined accoreding to the results
7 IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
8   MESSAGE(STATUS "Check for ANSI scope")
9   TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE  ${CMAKE_BINARY_DIR} 
10     ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx
11     OUTPUT_VARIABLE OUTPUT)
12   IF (CMAKE_ANSI_FOR_SCOPE)
13     MESSAGE(STATUS "Check for ANSI scope - found")
14     SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL 
15       "Does the compiler support ansi for scope.")
16     FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
17       "Determining if the CXX compiler understands ansi for scopes passed with "
18       "the following output:\n${OUTPUT}\n\n")
19   ELSE (CMAKE_ANSI_FOR_SCOPE)
20     MESSAGE(STATUS "Check for ANSI scope - not found")
21     SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL 
22       "Does the compiler support ansi for scope.")
23     FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
24       "Determining if the CXX compiler understands ansi for scopes failed with "
25       "the following output:\n${OUTPUT}\n\n")
26   ENDIF (CMAKE_ANSI_FOR_SCOPE)
27 ENDIF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")