From ba89e6d4a58175f333e402945e788eb84e3a45af Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Wed, 15 Apr 2020 16:30:42 +0300 Subject: [PATCH] [SYCL] Always use dynamic CRT for Unit tests (#1515) Signed-off-by: Alexander Batashev --- sycl/unittests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sycl/unittests/CMakeLists.txt b/sycl/unittests/CMakeLists.txt index 543f17b8d0687..1199e4e7ba9d8 100644 --- a/sycl/unittests/CMakeLists.txt +++ b/sycl/unittests/CMakeLists.txt @@ -1,6 +1,12 @@ add_custom_target(SYCLUnitTests) set_target_properties(SYCLUnitTests PROPERTIES FOLDER "SYCL tests") +foreach(flag_var + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +string(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}") +endforeach() + # add_sycl_unittest(test_dirname SHARED|OBJECT file1.cpp, file2.cpp ...) # # Will compile the list of files together and link against SYCL.