Merge pull request #2546 from proydakov/msvc-noexcept-fix

Fixed msvc 2019 nmake noexcept build.
This commit is contained in:
greg-lunarg 2021-02-24 12:02:07 -07:00 committed by GitHub
commit 9801a9e42a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,6 +193,9 @@ elseif(MSVC)
endif()
if(ENABLE_EXCEPTIONS)
add_compile_options(/EHsc) # Enable Exceptions
else()
string(REGEX REPLACE /EHsc "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Try to remove default /EHsc cxx_flag
add_compile_definitions(_HAS_EXCEPTIONS=0)
endif()
endif()