[Openmp-commits] [PATCH] D153628: OpenMP/cmake: Use TARGET_FILE instead of looking for amdgpu-arch

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 13:09:06 PDT 2023


tianshilei1992 added a comment.

In D153628#4445131 <https://reviews.llvm.org/D153628#4445131>, @arsenm wrote:

> In D153628#4445094 <https://reviews.llvm.org/D153628#4445094>, @tianshilei1992 wrote:
>
>> `$<TARGET_FILE:amdgpu-arch>` should work. We have similar code in `openmp/libomptarget/DeviceRTL/CMakeLists.txt`.
>
> But those are to add_custom_command with an output that targets depend on, which is at build time. It seems to not work with execute_process which is configure time?

Hmm, that's odd as `TARGET_FILE` is supposed to give the full path of the target binary file (https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_FILE), and using that in `execute_process` should be fine. Not sure what error you encountered.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153628/new/

https://reviews.llvm.org/D153628



More information about the Openmp-commits mailing list