Fix build break for Debug on WSL (#299)

This commit is contained in:
Chuck Walbourn
2022-12-27 12:03:08 -08:00
committed by GitHub
parent 23b7fd1f38
commit e4f5af944c
4 changed files with 46 additions and 18 deletions

View File

@@ -27,6 +27,8 @@ option(BC_USE_OPENMP "Build with OpenMP support" ON)
# https://devblogs.microsoft.com/cppblog/spectre-mitigations-in-msvc/
option(ENABLE_SPECTRE_MITIGATION "Build using /Qspectre for MSVC" OFF)
option(DISABLE_MSVC_ITERATOR_DEBUGGING "Disable iterator debugging in Debug configurations with the MSVC CRT" OFF)
option(ENABLE_CODE_ANALYSIS "Use Static Code Analysis on build" OFF)
option(USE_PREBUILT_SHADERS "Use externally built HLSL shaders" OFF)
@@ -415,6 +417,12 @@ if(WIN32)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE _UNICODE UNICODE _WIN32_WINNT=${WINVER})
endforeach()
if(DISABLE_MSVC_ITERATOR_DEBUGGING)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE _ITERATOR_DEBUG_LEVEL=0)
endforeach()
endif()
endif()
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))