TestForANSIForScope.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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_ANSI_FOR_SCOPE" MATCHES "^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. OUTPUT_VARIABLE OUTPUT)
  11. IF (CMAKE_ANSI_FOR_SCOPE)
  12. MESSAGE(STATUS "Check for ANSI scope - found")
  13. SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
  14. "Does the compiler support ansi for scope.")
  15. FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
  16. "Determining if the CXX compiler understands ansi for scopes passed with "
  17. "the following output:\n${OUTPUT}\n\n")
  18. ELSE (CMAKE_ANSI_FOR_SCOPE)
  19. MESSAGE(STATUS "Check for ANSI scope - not found")
  20. SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
  21. "Does the compiler support ansi for scope.")
  22. FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
  23. "Determining if the CXX compiler understands ansi for scopes failed with "
  24. "the following output:\n${OUTPUT}\n\n")
  25. ENDIF (CMAKE_ANSI_FOR_SCOPE)
  26. ENDIF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")