Intel-C.cmake 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. include(Compiler/Intel)
  2. __compiler_intel(C)
  3. string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
  4. string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
  5. string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
  6. set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>")
  7. if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
  8. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0.0)
  9. set(CMAKE_C11_STANDARD_COMPILE_OPTION "-Qstd=c11")
  10. set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-Qstd=c11")
  11. set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
  12. endif()
  13. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
  14. set(CMAKE_C90_STANDARD_COMPILE_OPTION "-Qstd=c89")
  15. set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-Qstd=c89")
  16. set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
  17. set(CMAKE_C99_STANDARD_COMPILE_OPTION "-Qstd=c99")
  18. set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-Qstd=c99")
  19. set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
  20. endif()
  21. else()
  22. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
  23. set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
  24. set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
  25. set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
  26. endif()
  27. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
  28. set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
  29. set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
  30. set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
  31. set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
  32. set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
  33. set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
  34. endif()
  35. endif()
  36. __compiler_check_default_language_standard(C 12.0 90 15.0.0 11)
  37. set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
  38. set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")