mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
Fixed guard:ehcont project setup
This commit is contained in:
parent
de64926fcc
commit
664a518c31
@ -173,12 +173,6 @@ if(MSVC)
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
|
||||
# Compiling with guard:ehcont allow library consumers to enable guard:ehcont if they want. (Requires VS 2019 x64)
|
||||
if((MSVC_VERSION GREATER 1920) AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
target_compile_options(GLTFSDK PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
target_link_options(GLTFSDK PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MINGW OR (NOT WIN32) OR VCPKG_TOOLCHAIN)
|
||||
@ -303,6 +297,12 @@ if(MSVC)
|
||||
target_link_options(${t} PRIVATE /SAFESEH)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Compiling with guard:ehcont allow library consumers to enable guard:ehcont if they want. (Requires VS 2019 16.7 or later)
|
||||
if((MSVC_VERSION GREATER 1928) AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
target_link_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${DIRECTX_ARCH} MATCHES "^arm")
|
||||
|
Loading…
Reference in New Issue
Block a user