Intel.cmake 955 B

123456789101112131415161718192021222324252627282930
  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. include(Compiler/CMakeCommonCompilerMacros)
  9. if(CMAKE_HOST_WIN32)
  10. # MSVC-like
  11. macro(__compiler_intel lang)
  12. endmacro()
  13. else()
  14. # GNU-like
  15. macro(__compiler_intel lang)
  16. set(CMAKE_${lang}_VERBOSE_FLAG "-v")
  17. string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
  18. string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
  19. string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
  20. string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
  21. string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
  22. set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
  23. endmacro()
  24. endif()