Skip to content

Commit 4d3d271

Browse files
committed
MSVC: Replace flags disabling exceptions and RTTI to avoid warning
1 parent 878c066 commit 4d3d271

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ if(nfd_PLATFORM STREQUAL PLATFORM_MACOS)
4343
endif()
4444

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

0 commit comments

Comments
 (0)