rttrorg / rttr

C++ Reflection Library
https://www.rttr.org
MIT License
3.17k stars 439 forks source link

[MSVC] Set CMAKE_CXX_FLAGS /EHsc #263

Open jbltx opened 4 years ago

jbltx commented 4 years ago

Hello,

Actually there's a warning when building the library in Visual Studio :

Warning C4530 : C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [rttr\rttr_core_lib.vcxproj]

This is annoying when you're building your project with /Wall and /Werror.

Could it be possible to set the flag in your CMakeLists.txt ?

IF(MSVC)
    SET(CMAKE_CXX_FLAGS "/EHsc")
ENDIF(MSVC)

Thank you.