CMakeLists.txt 554 B

1234567891011121314151617181920212223242526272829
  1. # ArduinoJson - https://arduinojson.org
  2. # Copyright © 2014-2022, Benoit BLANCHON
  3. # MIT License
  4. if(MSVC_VERSION LESS 1910)
  5. return()
  6. endif()
  7. if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
  8. return()
  9. endif()
  10. if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)
  11. return()
  12. endif()
  13. set(CMAKE_CXX_STANDARD 17)
  14. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  15. add_executable(Cpp17Tests
  16. string_view.cpp
  17. )
  18. add_test(Cpp17 Cpp17Tests)
  19. set_tests_properties(Cpp17
  20. PROPERTIES
  21. LABELS "Catch"
  22. )