Intel-C.cmake 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. endif()
  12. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
  13. set(CMAKE_C90_STANDARD_COMPILE_OPTION "-Qstd=c89")
  14. set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-Qstd=c89")
  15. set(CMAKE_C99_STANDARD_COMPILE_OPTION "-Qstd=c99")
  16. set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-Qstd=c99")
  17. endif()
  18. else()
  19. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
  20. set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
  21. set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
  22. endif()
  23. if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
  24. set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
  25. set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
  26. set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
  27. set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
  28. endif()
  29. endif()
  30. __compiler_check_default_language_standard(C 12.0 90 15.0.0 11)
  31. set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
  32. set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")