Skip to content

Commit db5008f

Browse files
committed
[SYCL] Changing option name in CMakeLists.txt files.
Signed-off-by: Garima Gupta <[email protected]>
1 parent d88284c commit db5008f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

sycl/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ if (MSVC)
144144
endif()
145145

146146
# This function allows building multiple libraries with the same options.
147-
# Currently used by sycl and plugins library.
148-
function( add_libcxxsupport_gccworkaround LIB_NAME)
147+
# Currently used by sycl and plugins library.
148+
# Currently handles linking with libcxx support and gcc workaround
149+
function( add_common_options LIB_NAME)
149150
if (SYCL_USE_LIBCXX)
150151
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
151152
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
@@ -169,7 +170,7 @@ function( add_libcxxsupport_gccworkaround LIB_NAME)
169170
endif()
170171

171172
endif()
172-
endfunction(add_libcxxsupport_gccworkaround)
173+
endfunction(add_common_options)
173174

174175
# SYCL runtime library
175176
add_subdirectory( source )

sycl/plugins/opencl/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ target_link_libraries( pi_opencl
3232
PRIVATE ${OpenCL_LIBRARIES}
3333
)
3434

35-
add_libcxxsupport_gccworkaround(pi_opencl)
35+
add_common_options(pi_opencl)
3636

3737
install(TARGETS pi_opencl
3838
LIBRARY DESTINATION "lib" COMPONENT pi_opencl

sycl/source/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function(add_sycl_rt_library LIB_NAME)
2727
PRIVATE ${CMAKE_DL_LIBS}
2828
)
2929

30-
add_libcxxsupport_gccworkaround(${LIB_NAME})
30+
add_common_options(${LIB_NAME})
3131

3232
endfunction(add_sycl_rt_library)
3333

0 commit comments

Comments
 (0)