Unverified Commit fbb9dc2c by John Kessenich Committed by GitHub

Merge pull request #2285 from proydakov/msvc-rtti-compilation-warning-fix

Fixed msvc 2019 nmake compiler warnings with RTTI.
parents 83970445 b90adef9
......@@ -140,7 +140,12 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
endif()
elseif(MSVC)
if(NOT ENABLE_RTTI)
add_compile_options(/GR-) # Disable RTTI
string(FIND "${CMAKE_CXX_FLAGS}" "/GR" MSVC_HAS_GR)
if(MSVC_HAS_GR)
string(REGEX REPLACE /GR /GR- CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
else()
add_compile_options(/GR-) # Disable RTTI
endif()
endif()
if(ENABLE_EXCEPTIONS)
add_compile_options(/EHsc) # Enable Exceptions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment