[CMake] Exception handling warning on windows

Aaron Boxer boxerab at gmail.com
Sun Jul 23 21:06:15 EDT 2017


Never mind, figured it out :)

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

On Sun, Jul 23, 2017 at 8:35 PM, Aaron Boxer <boxerab at gmail.com> wrote:

> Hello,
>
> I am getting the following warning when building my project on Visual
> Studio 14:
>
> warning C4530: C++ exception handler used, but unwind semantics are not
> enabled. Specify /EHsc
>
> Is there a cmake option to enable unwind semantics on windows ?
>
> Thanks,
> Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170723/37d528ed/attachment.html>


More information about the CMake mailing list