[Openmp-commits] [PATCH] D153642: OpenMP/cmake: Use DEPFILE instead of IMPLICIT_DEPENDS

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 09:30:57 PDT 2023

arsenm created this revision.
arsenm added reviewers: JonChesterfield, saiislam, ronlieb, jhuber6, jdoerfert, tianshilei1992.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added subscribers: jplehr, sstefan1, wdng.

IMPLICIT_DEPENDS doesn't actually work with ninja and this does.



Index: openmp/libomptarget/DeviceRTL/CMakeLists.txt
--- openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -138,15 +138,17 @@
     get_filename_component(infile ${src} ABSOLUTE)
     get_filename_component(outfile ${src} NAME)
     set(outfile "${outfile}-${target_cpu}.bc")
+    set(depfile "${outfile}.d")
     add_custom_command(OUTPUT ${outfile}
+      -MD -MF ${depfile}
       ${infile} -o ${outfile}
-      DEPENDS ${infile} ${include_files}
-      IMPLICIT_DEPENDS CXX ${infile}
+      DEPENDS ${infile}
+      DEPFILE ${depfile}
       COMMENT "Building LLVM bitcode ${outfile}"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153642.533984.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230623/c055c81e/attachment.bin>

More information about the Openmp-commits mailing list