Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Modules / Platform / Windows-Intel-C.cmake
1 include(Platform/Windows-Intel)
2 __windows_compiler_intel(C)
3
4 set(CMAKE_DEPFILE_FLAGS_C "-QMD -QMT <DEP_TARGET> -QMF <DEP_FILE>")
5 set(CMAKE_C_DEPFILE_FORMAT gcc)
6
7 if(CMAKE_GENERATOR MATCHES "^Ninja")
8   if(_CMAKE_NINJA_VERSION VERSION_LESS 1.9)
9     # This ninja version is too old to support the Intel depfile format.
10     # Fall back to msvc depfile format.
11     set(CMAKE_DEPFILE_FLAGS_C "/showIncludes")
12     set(CMAKE_C_DEPFILE_FORMAT msvc)
13   endif()
14 endif()
15
16 if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
17     AND CMAKE_GENERATOR MATCHES "Makefiles|WMake")
18   # dependencies are computed by the compiler itself
19   set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
20 endif()
21
22 # The Intel compiler does not properly escape spaces in a depfile which can
23 # occur in source and binary cmake paths as well as external include paths.
24 # Until Intel fixes this bug, fall back unconditionally to msvc depfile format.
25 set(CMAKE_DEPFILE_FLAGS_C "/showIncludes")
26 set(CMAKE_C_DEPFILE_FORMAT msvc)