Intel.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #=============================================================================
  2. # Copyright 2002-2016 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. # This module is shared by multiple languages; use include blocker.
  14. if(__COMPILER_INTEL)
  15. return()
  16. endif()
  17. set(__COMPILER_INTEL 1)
  18. if(CMAKE_HOST_WIN32)
  19. # MSVC-like
  20. macro(__compiler_intel lang)
  21. endmacro()
  22. else()
  23. # GNU-like
  24. macro(__compiler_intel lang)
  25. set(CMAKE_${lang}_VERBOSE_FLAG "-v")
  26. string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
  27. string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
  28. string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
  29. string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
  30. string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
  31. endmacro()
  32. endif()