Skip to content

Commit

Permalink
MSVC: Replace flags disabling exceptions and RTTI to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
btzy committed Apr 25, 2021
1 parent 878c066 commit 4d3d271
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ if(nfd_PLATFORM STREQUAL PLATFORM_MACOS)
endif()

if(nfd_COMPILER STREQUAL COMPILER_MSVC)
target_compile_options(${TARGET_NAME} PRIVATE /EHs-c- /GR-)
string(REPLACE "/EHsc" "/EHs-c-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/GR" "/GR-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY STATIC_LIBRARY_OPTIONS /NODEFAULTLIB)
endif()

Expand Down

0 comments on commit 4d3d271

Please sign in to comment.