Skip to content

Commit 07f2a09

Browse files
authored
[CMake] Improve libdevice install logic (#20394)
See: #6937 This patch ensures that all required objects are built before installation.
1 parent 19e28f0 commit 07f2a09

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,3 +898,13 @@ foreach(ftype IN LISTS filetypes)
898898
COMPONENT libsycldevice)
899899
endforeach()
900900

901+
set(libsycldevice_build_targets)
902+
foreach(filetype IN LISTS filetypes)
903+
list(APPEND libsycldevice_build_targets libsycldevice-${filetype})
904+
endforeach()
905+
906+
add_custom_target(install-libsycldevice
907+
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=libsycldevice -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
908+
DEPENDS ${libsycldevice_build_targets}
909+
)
910+
add_dependencies(deploy-sycl-toolchain install-libsycldevice)

0 commit comments

Comments
 (0)