diff --git a/CMakeLists.txt b/CMakeLists.txt index 2db25eb..c4f8051 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,6 +297,13 @@ if(MSVC) target_link_options(${t} PRIVATE /SAFESEH) endforeach() endif() + + if((MSVC_VERSION GREATER_EQUAL 1928) AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) + foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) + target_compile_options(${t} PRIVATE "$<$>:/guard:ehcont>") + target_link_options(${t} PRIVATE "$<$>:/guard:ehcont>") + endforeach() + endif() endif() if(NOT ${DIRECTX_ARCH} MATCHES "^arm") diff --git a/DirectXTex/DirectXTex_Desktop_2019.vcxproj b/DirectXTex/DirectXTex_Desktop_2019.vcxproj index 948bd33..1ea7c70 100644 --- a/DirectXTex/DirectXTex_Desktop_2019.vcxproj +++ b/DirectXTex/DirectXTex_Desktop_2019.vcxproj @@ -221,6 +221,7 @@ true true Level4 + true true @@ -274,6 +275,7 @@ true true Level4 + true true diff --git a/DirectXTex/DirectXTex_Desktop_2019_Win10.vcxproj b/DirectXTex/DirectXTex_Desktop_2019_Win10.vcxproj index 8aeb691..de71431 100644 --- a/DirectXTex/DirectXTex_Desktop_2019_Win10.vcxproj +++ b/DirectXTex/DirectXTex_Desktop_2019_Win10.vcxproj @@ -303,6 +303,7 @@ true true Level4 + true true @@ -329,6 +330,7 @@ true true Level4 + true true @@ -382,6 +384,7 @@ true true Level4 + true true @@ -408,6 +411,7 @@ true true Level4 + true true diff --git a/DirectXTex/DirectXTex_Desktop_2022.vcxproj b/DirectXTex/DirectXTex_Desktop_2022.vcxproj index 345ef8b..b3385cc 100644 --- a/DirectXTex/DirectXTex_Desktop_2022.vcxproj +++ b/DirectXTex/DirectXTex_Desktop_2022.vcxproj @@ -221,6 +221,7 @@ true true Level4 + true true @@ -274,6 +275,7 @@ true true Level4 + true true diff --git a/DirectXTex/DirectXTex_Desktop_2022_Win10.vcxproj b/DirectXTex/DirectXTex_Desktop_2022_Win10.vcxproj index baf2f76..6547424 100644 --- a/DirectXTex/DirectXTex_Desktop_2022_Win10.vcxproj +++ b/DirectXTex/DirectXTex_Desktop_2022_Win10.vcxproj @@ -303,6 +303,7 @@ true true Level4 + true true @@ -329,6 +330,7 @@ true true Level4 + true true @@ -382,6 +384,7 @@ true true Level4 + true true @@ -408,6 +411,7 @@ true true Level4 + true true diff --git a/DirectXTex/DirectXTex_Windows10_2019.vcxproj b/DirectXTex/DirectXTex_Windows10_2019.vcxproj index 8ba117f..8afb023 100644 --- a/DirectXTex/DirectXTex_Windows10_2019.vcxproj +++ b/DirectXTex/DirectXTex_Windows10_2019.vcxproj @@ -363,6 +363,7 @@ /Zc:twoPhase- /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) true Level4 + true Console @@ -411,6 +412,7 @@ /Zc:twoPhase- /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) true Level4 + true Console diff --git a/DirectXTex/DirectXTex_Windows10_2022.vcxproj b/DirectXTex/DirectXTex_Windows10_2022.vcxproj index 249643f..285d4b5 100644 --- a/DirectXTex/DirectXTex_Windows10_2022.vcxproj +++ b/DirectXTex/DirectXTex_Windows10_2022.vcxproj @@ -363,6 +363,7 @@ /Zc:twoPhase- /Zc:__cplusplus %(AdditionalOptions) true Level4 + true Console @@ -411,6 +412,7 @@ /Zc:twoPhase- /Zc:__cplusplus %(AdditionalOptions) true Level4 + true Console