Skip to content
Snippets Groups Projects
Commit 25a5547f authored by Administrator's avatar Administrator
Browse files

Change CMake function xpu_attach

The change is needed since the passed information isn't any longer a library
name but a CMake target such that the new information has to be attached
differently.
parent 7944bf1e
No related branches found
No related tags found
No related merge requests found
...@@ -128,11 +128,12 @@ function(xpu_attach Library) ...@@ -128,11 +128,12 @@ function(xpu_attach Library)
get_filename_component(KernelDeclFullPath "${KernelDecl}" REALPATH) get_filename_component(KernelDeclFullPath "${KernelDecl}" REALPATH)
target_compile_definitions(${Library} PRIVATE XPU_IMAGE_FILE="${Library}") set_property(TARGET ${Library} APPEND PROPERTY COMPILE_DEFINITIONS XPU_IMAGE_FILE="${Library}")
target_compile_options(${Library} PUBLIC -fPIC) set_property(TARGET ${Library} APPEND PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(${Library} xpu) set_property(TARGET ${Library} APPEND PROPERTY LINK_LIBRARIES xpu)
if (TARGET OpenMP::OpenMP_CXX) if (TARGET OpenMP::OpenMP_CXX)
target_link_libraries(${Library} OpenMP::OpenMP_CXX) set_property(TARGET ${Library} APPEND PROPERTY LINK_LIBRARIES OpenMP::OpenMP_CXX)
endif() endif()
file(REMOVE ${UnitySrcAbsolute}) file(REMOVE ${UnitySrcAbsolute})
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment