@@ -33,67 +33,3 @@ function(add_sycl_library LIB_NAME TYPE)
3333 # TODO remove add_common_options
3434 add_common_options(${LIB_NAME} )
3535endfunction ()
36-
37- # current ur adapter dependency managing is a bit hacky, we should try to copy
38- # this as closely as possible instead
39- function (add_sycl_plugin PLUGIN_NAME)
40- cmake_parse_arguments ("ARG"
41- ""
42- ""
43- "SOURCES;INCLUDE_DIRS;LIBRARIES;HEADER"
44- ${ARGN}
45- )
46-
47- add_sycl_library("pi_${PLUGIN_NAME} " SHARED
48- LINKER_SCRIPT "${PROJECT_SOURCE_DIR} /plugins/ld-version-script.txt"
49- SOURCES ${ARG_SOURCES}
50- INCLUDE_DIRS
51- ${ARG_INCLUDE_DIRS}
52- ${sycl_inc_dir}
53- LIBRARIES
54- ${ARG_LIBRARIES}
55- OpenCL-Headers
56- )
57-
58- # All SYCL plugins use UR sources.
59- # Disable errors from warnings and apply other workarounds while building the UR.
60- if (WIN32 )
61- target_compile_options ("pi_${PLUGIN_NAME} " PRIVATE /WX- /UUNICODE /DUSE_Z7=ON )
62- else ()
63- target_compile_options ("pi_${PLUGIN_NAME} " PRIVATE -Wno-error)
64- endif ()
65-
66- # Install feature test header
67- if (NOT "${ARG_HEADER} " STREQUAL "" )
68- get_filename_component (HEADER_NAME ${ARG_HEADER} NAME )
69- configure_file (
70- ${ARG_HEADER}
71- ${SYCL_INCLUDE_BUILD_DIR} /sycl/detail/plugins/${PLUGIN_NAME} /${HEADER_NAME}
72- COPYONLY )
73-
74- install (FILES ${ARG_HEADER}
75- DESTINATION ${SYCL_INCLUDE_DIR} /sycl/detail/plugins/${PLUGIN_NAME}
76- COMPONENT pi_${PLUGIN_NAME} )
77- endif ()
78-
79- install (TARGETS pi_${PLUGIN_NAME}
80- LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX} " COMPONENT pi_${PLUGIN_NAME}
81- RUNTIME DESTINATION "bin" COMPONENT pi_${PLUGIN_NAME} )
82-
83- set (manifest_file
84- ${CMAKE_CURRENT_BINARY_DIR} /install_manifest_pi_${PLUGIN_NAME} .txt)
85- add_custom_command (OUTPUT ${manifest_file}
86- COMMAND "${CMAKE_COMMAND} "
87- "-DCMAKE_INSTALL_COMPONENT=pi_${PLUGIN_NAME} "
88- -P "${CMAKE_BINARY_DIR} /cmake_install.cmake"
89- COMMENT "Deploying component pi_${PLUGIN_NAME} "
90- USES_TERMINAL
91- )
92- add_custom_target (install -sycl-plugin-${PLUGIN_NAME}
93- DEPENDS
94- ${manifest_file} pi_${PLUGIN_NAME}
95- )
96-
97- set_property (GLOBAL APPEND PROPERTY SYCL_TOOLCHAIN_INSTALL_COMPONENTS
98- pi_${PLUGIN_NAME} )
99- endfunction ()
0 commit comments