use target_* commands to configure exceptions

This commit is contained in:
Steven Siloti 2017-07-08 13:47:23 -07:00 committed by Arvid Norberg
parent 6343794900
commit 41465678cd
1 changed files with 4 additions and 4 deletions

View File

@ -314,15 +314,15 @@ endif()
if (exceptions) if (exceptions)
if (MSVC) if (MSVC)
add_definitions(/EHsc) target_compile_options(torrent-rasterbar PUBLIC /EHsc)
else (MSVC) else (MSVC)
add_definitions(-fexceptions) target_compile_options(torrent-rasterbar PUBLIC -fexceptions)
endif (MSVC) endif (MSVC)
else() else()
if (MSVC) if (MSVC)
add_definitions(-D_HAS_EXCEPTIONS=0) target_compile_definitions(torrent-rasterbar PUBLIC _HAS_EXCEPTIONS=0)
else (MSVC) else (MSVC)
add_definitions(-fno-exceptions) target_compile_options(torrent-rasterbar PUBLIC -fno-exceptions)
endif (MSVC) endif (MSVC)
endif() endif()