1
0

TestForANSIForScope.cmake 739 B

123456789101112131415161718192021222324
  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(NOT CMAKE_ANSI_FOR_SCOPE)
  7. MESSAGE(STATUS "Check for ANSI scope")
  8. TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR}
  9. ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx)
  10. IF (CMAKE_ANSI_FOR_SCOPE)
  11. MESSAGE(STATUS "Check for ANSI scope - found")
  12. SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
  13. "Does the compiler support ansi for scope.")
  14. ELSE (CMAKE_ANSI_FOR_SCOPE)
  15. MESSAGE(STATUS "Check for ANSI scope - not found")
  16. SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
  17. "Does the compiler support ansi for scope.")
  18. ENDIF (CMAKE_ANSI_FOR_SCOPE)
  19. ENDIF(NOT CMAKE_ANSI_FOR_SCOPE)