This repository was archived by the owner on Aug 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -403,11 +403,15 @@ function(__build_ir)
403
403
404
404
# Depfile support was only added in CMake 3.7
405
405
# CMake throws an error if it is unsupported by the generator (i. e. not ninja)
406
- if ((NOT CMAKE_VERSION VERSION_LESS 3.7.0 ) AND
407
- CMAKE_GENERATOR MATCHES "Ninja" )
406
+ if (((NOT CMAKE_VERSION VERSION_LESS 3.7.0 ) AND CMAKE_GENERATOR MATCHES "Ninja" ) OR
407
+ ((NOT CMAKE_VERSION VERSION_LESS 3.17.0 ) AND CMAKE_GENERATOR MATCHES "Ninja Multi-Config" ) OR
408
+ ((NOT CMAKE_VERSION VERSION_LESS 3.20.0 ) AND CMAKE_GENERATOR MATCHES "Make" )
409
+ )
408
410
file (RELATIVE_PATH relOutputFile ${CMAKE_BINARY_DIR} ${outputDeviceFile} )
409
411
set (generate_depfile -MMD -MF ${depFileName} -MT ${relOutputFile} )
410
- set (enable_depfile DEPFILE ${depFileName} )
412
+ set (depfile_arg DEPFILE ${depFileName} )
413
+ else ()
414
+ set (implicit_depends_arg IMPLICIT_DEPENDS CXX ${ARG_SOURCE} )
411
415
endif ()
412
416
413
417
# Add custom command for running compute++
@@ -423,8 +427,8 @@ function(__build_ir)
423
427
${generate_depfile}
424
428
COMMAND_EXPAND_LISTS
425
429
DEPENDS ${ir_dependencies}
426
- IMPLICIT_DEPENDS CXX ${ARG_SOURCE }
427
- ${enable_depfile }
430
+ ${implicit_depends_arg }
431
+ ${depfile_arg }
428
432
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
429
433
COMMENT "Building ComputeCpp integration header file ${outputSyclFile} " )
430
434
You can’t perform that action at this time.
0 commit comments