From c2ed58573719ea4a744ab2e6b2ffac5b1374911b Mon Sep 17 00:00:00 2001 From: "Patel, Jaydeepkumar" Date: Thu, 10 Apr 2025 02:55:58 -0700 Subject: [PATCH] SWDEV-521262 - Adding MSVC compiler options to fix the conflict with SC module while building hip in debug. (#24) [ROCm/clr commit: 997519fa9478c87e444c0f3151d1d4b98b7c5ee3] --- projects/clr/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/clr/CMakeLists.txt b/projects/clr/CMakeLists.txt index cc9cf16542..879debac4a 100644 --- a/projects/clr/CMakeLists.txt +++ b/projects/clr/CMakeLists.txt @@ -28,6 +28,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") add_compile_options("/wd4267" "/wd4244" "/wd4996") string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) string(REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_compile_options(/MTd) + add_compile_options(-D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH) + endif() endif() option(CLR_BUILD_HIP "Build HIP" OFF) option(CLR_BUILD_OCL "Build OCL" OFF)