diff --git a/sycl/source/CMakeLists.txt b/sycl/source/CMakeLists.txt index cb27f9778792d..7ecd155a3849b 100644 --- a/sycl/source/CMakeLists.txt +++ b/sycl/source/CMakeLists.txt @@ -127,10 +127,10 @@ if (MSVC) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "") set(CMAKE_CXX_FLAGS_DEBUG "") - target_compile_options(sycl PUBLIC ${SYCL_CXX_FLAGS_RELEASE}) + target_compile_options(sycl PRIVATE ${SYCL_CXX_FLAGS_RELEASE}) add_sycl_rt_library(sycld ${SYCL_SOURCES}) - target_compile_options(sycld PUBLIC ${SYCL_CXX_FLAGS_DEBUG}) + target_compile_options(sycld PRIVATE ${SYCL_CXX_FLAGS_DEBUG}) endif() install(TARGETS ${SYCL_RT_LIBS}