From 41465678cd8bbcd4707a60105fce1f71a5c1d42d Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Sat, 8 Jul 2017 13:47:23 -0700 Subject: [PATCH] use target_* commands to configure exceptions --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebf45cbc7..4feb66cce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,15 +314,15 @@ endif() if (exceptions) if (MSVC) - add_definitions(/EHsc) + target_compile_options(torrent-rasterbar PUBLIC /EHsc) else (MSVC) - add_definitions(-fexceptions) + target_compile_options(torrent-rasterbar PUBLIC -fexceptions) endif (MSVC) else() if (MSVC) - add_definitions(-D_HAS_EXCEPTIONS=0) + target_compile_definitions(torrent-rasterbar PUBLIC _HAS_EXCEPTIONS=0) else (MSVC) - add_definitions(-fno-exceptions) + target_compile_options(torrent-rasterbar PUBLIC -fno-exceptions) endif (MSVC) endif()