Intel.cmake 910 B

12345678910111213141516171819202122232425262728
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # This module is shared by multiple languages; use include blocker.
  4. if(__COMPILER_INTEL)
  5. return()
  6. endif()
  7. set(__COMPILER_INTEL 1)
  8. if(CMAKE_HOST_WIN32)
  9. # MSVC-like
  10. macro(__compiler_intel lang)
  11. endmacro()
  12. else()
  13. # GNU-like
  14. macro(__compiler_intel lang)
  15. set(CMAKE_${lang}_VERBOSE_FLAG "-v")
  16. string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
  17. string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
  18. string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
  19. string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
  20. string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
  21. set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
  22. endmacro()
  23. endif()