1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00

Enable guard:ehcont compiler flag for MSVC 64 bit architectures (#280)

This commit is contained in:
Chuck Walbourn 2022-07-25 14:57:05 -07:00
commit 0279397bfb
7 changed files with 23 additions and 0 deletions

View File

@ -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 "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>")
target_link_options(${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>")
endforeach()
endif()
endif()
if(NOT ${DIRECTX_ARCH} MATCHES "^arm")

View File

@ -221,6 +221,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -274,6 +275,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -303,6 +303,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -329,6 +330,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -382,6 +384,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -408,6 +411,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -221,6 +221,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -274,6 +275,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -303,6 +303,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -329,6 +330,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -382,6 +384,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -408,6 +411,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -363,6 +363,7 @@
<AdditionalOptions>/Zc:twoPhase- /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
<OpenMPSupport>true</OpenMPSupport>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -411,6 +412,7 @@
<AdditionalOptions>/Zc:twoPhase- /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
<OpenMPSupport>true</OpenMPSupport>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>

View File

@ -363,6 +363,7 @@
<AdditionalOptions>/Zc:twoPhase- /Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<OpenMPSupport>true</OpenMPSupport>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -411,6 +412,7 @@
<AdditionalOptions>/Zc:twoPhase- /Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<OpenMPSupport>true</OpenMPSupport>
<ExternalWarningLevel>Level4</ExternalWarningLevel>
<GuardEHContMetadata>true</GuardEHContMetadata>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>