TestForSSTREAM.cmake 1.2 KB

1234567891011121314151617181920212223242526272829
  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
  4. #
  5. IF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
  6. MESSAGE(STATUS "Check for sstream")
  7. TRY_COMPILE(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
  8. ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx
  9. OUTPUT_VARIABLE OUTPUT)
  10. IF (CMAKE_HAS_ANSI_STRING_STREAM)
  11. MESSAGE(STATUS "Check for sstream - found")
  12. SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL
  13. "Does the compiler support sstream")
  14. FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
  15. "Determining if the CXX compiler has sstream passed with "
  16. "the following output:\n${OUTPUT}\n\n")
  17. ELSE (CMAKE_HAS_ANSI_STRING_STREAM)
  18. MESSAGE(STATUS "Check for sstream - not found")
  19. SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
  20. "Does the compiler support sstream")
  21. FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
  22. "Determining if the CXX compiler has sstream failed with "
  23. "the following output:\n${OUTPUT}\n\n")
  24. ENDIF (CMAKE_HAS_ANSI_STRING_STREAM)
  25. ENDIF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")