Browse Source

Merge topic 'Windows-Intel-dependencies'

90874a542e Intel classic compilers on Windows: use msvc style dependencies

Acked-by: Kitware Robot <[email protected]>
Acked-by: Ben Boeckel <[email protected]>
Merge-request: !7668
Brad King 3 years ago
parent
commit
e457663ac1
2 changed files with 10 additions and 12 deletions
  1. 5 6
      Modules/Platform/Windows-Intel-C.cmake
  2. 5 6
      Modules/Platform/Windows-Intel-CXX.cmake

+ 5 - 6
Modules/Platform/Windows-Intel-C.cmake

@@ -19,9 +19,8 @@ if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
   set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
 endif()
 
-if("${CMAKE_SOURCE_DIR}${CMAKE_BINARY_DIR}" MATCHES " ")
-  # The Intel compiler does not properly escape spaces in a depfile.
-  # Fall back to msvc depfile format.
-  set(CMAKE_DEPFILE_FLAGS_C "/showIncludes")
-  set(CMAKE_C_DEPFILE_FORMAT msvc)
-endif()
+# The Intel compiler does not properly escape spaces in a depfile which can
+# occur in source and binary cmake paths as well as external include paths.
+# Until Intel fixes this bug, fall back unconditionally to msvc depfile format.
+set(CMAKE_DEPFILE_FLAGS_C "/showIncludes")
+set(CMAKE_C_DEPFILE_FORMAT msvc)

+ 5 - 6
Modules/Platform/Windows-Intel-CXX.cmake

@@ -20,9 +20,8 @@ if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
  set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
 endif()
 
-if("${CMAKE_SOURCE_DIR}${CMAKE_BINARY_DIR}" MATCHES " ")
-  # The Intel compiler does not properly escape spaces in a depfile.
-  # Fall back to msvc depfile format.
-  set(CMAKE_DEPFILE_FLAGS_CXX "/showIncludes")
-  set(CMAKE_CXX_DEPFILE_FORMAT msvc)
-endif()
+# The Intel compiler does not properly escape spaces in a depfile which can
+# occur in source and binary cmake paths as well as external include paths.
+# Until Intel fixes this bug, fall back unconditionally to msvc depfile format.
+set(CMAKE_DEPFILE_FLAGS_CXX "/showIncludes")
+set(CMAKE_CXX_DEPFILE_FORMAT msvc)