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

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 13:11:03 PDT 2023


arsenm added a comment.

In D153628#4445163 <https://reviews.llvm.org/D153628#4445163>, @tianshilei1992 wrote:

> 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.

It tries to execute the literal string '$<TARGET_FILE:amdgpu-arch>' and produces no such file or directory error


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

https://reviews.llvm.org/D153628



More information about the Openmp-commits mailing list