Summary: I'll probably want to use this as a more generic utility in the future. This patch reworks it to make it a top level function. I also tried to decouple this from the OpenMP utilities to make that easier in the future. Instead, I just use `-march=native` functionality which is the same thing. Needed a small hack to skip the linker stage for checking if that works. This should still create the same output as far as I'm aware.
8 lines
354 B
CMake
8 lines
354 B
CMake
add_offload_test_device_code(foo.c foo)
|
|
add_offload_test_device_code(bar.c bar)
|
|
# Compile with optimizations to eliminate AMDGPU implicit arguments.
|
|
add_offload_test_device_code(noargs.c noargs -O3)
|
|
|
|
add_custom_target(offload_device_binaries DEPENDS foo.bin bar.bin noargs.bin)
|
|
set(OFFLOAD_TEST_DEVICE_CODE_PATH ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
|