File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.18 )
22project (InfiniOps LANGUAGES CXX )
33
4+ if (POLICY CMP0116)
5+ cmake_policy (SET CMP0116 NEW )
6+ endif ()
7+
48set (CMAKE_CXX_STANDARD 17)
59set (CMAKE_CXX_STANDARD_REQUIRED ON )
610
Original file line number Diff line number Diff line change @@ -541,15 +541,22 @@ if(GENERATE_PYTHON_BINDINGS)
541541 foreach (_src IN LISTS PYBIND11_DISPATCH_SOURCES)
542542 get_filename_component (_name "${_src} " NAME_WE )
543543 set (_obj "${_iluvatar_dispatch_object_dir} /${_name} .o" )
544+ set (_dep "${_obj} .d" )
545+ set (_depfile_arg)
546+ if (CMAKE_GENERATOR MATCHES "Ninja" )
547+ set (_depfile_arg DEPFILE "${_dep} " )
548+ endif ()
544549 add_custom_command (
545550 OUTPUT "${_obj} "
546551 COMMAND ${CMAKE_COMMAND } -E make_directory "${_iluvatar_dispatch_object_dir} "
547552 COMMAND ${ILUVATAR_CUDA_COMPILER}
548553 ${_iluvatar_dispatch_defs}
549554 ${_iluvatar_dispatch_include_flags}
550555 ${ILUVATAR_CUDA_FLAGS}
556+ -MMD -MF "${_dep} "
551557 -c "${_src} " -o "${_obj} "
552558 DEPENDS "${_src} "
559+ ${_depfile_arg}
553560 COMMENT "Compiling ${_name} .cc with CoreX clang++"
554561 VERBATIM
555562 )
You can’t perform that action at this time.
0 commit comments