Skip to content

Commit eadce94

Browse files
author
Alexander Batashev
authored
[SYCL] Enable instantiation after specialization warning where possible (#2850)
This is a followup for 56b9a1d
1 parent 7f3801b commit eadce94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sycl/source/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ function(add_sycl_rt_library LIB_NAME)
9090
VERSION ${SYCL_VERSION_STRING}
9191
SOVERSION ${SYCL_MAJOR_VERSION})
9292

93+
check_cxx_compiler_flag(-Winstantiation-after-specialization
94+
HAS_INST_AFTER_SPEC)
95+
if (HAS_INST_AFTER_SPEC)
96+
target_compile_options(${LIB_OBJ_NAME} PRIVATE
97+
-Winstantiation-after-specialization)
98+
endif()
9399
endfunction(add_sycl_rt_library)
94100

95101
set(SYCL_SOURCES

0 commit comments

Comments
 (0)