PGI-CXX.cmake 1.2 KB

123456789101112131415161718192021222324252627
  1. include(Compiler/PGI)
  2. __compiler_pgi(CXX)
  3. string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
  4. string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
  5. if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10)
  6. set(CMAKE_CXX98_STANDARD_COMPILE_OPTION -A)
  7. set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION --gnu_extensions)
  8. set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
  9. if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.10)
  10. set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11 -A)
  11. set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION --c++11 --gnu_extensions)
  12. set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
  13. if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.7)
  14. set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14 -A)
  15. set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION --c++14 --gnu_extensions)
  16. set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
  17. if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1)
  18. set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17 -A)
  19. set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION --c++17 --gnu_extensions)
  20. set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON)
  21. endif()
  22. endif()
  23. endif()
  24. endif()
  25. __compiler_check_default_language_standard(CXX 12.10 98)