From 7dc378e296fa25c4eb8f10dae600c9f35fcad372 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 19 Aug 2019 11:38:19 +0300 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c912064..3aa64540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,8 +123,12 @@ if(SPDLOG_WCHAR_SUPPORT) if(SPDLOG_NO_EXCEPTIONS) target_compile_definitions(spdlog PUBLIC SPDLOG_NO_EXCEPTIONS) - target_compile_options(spdlog PRIVATE -fno-exceptions) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS) + + target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS) + + if(NOT MSVC) + target_compile_options(spdlog PRIVATE -fno-exceptions) + endif() endif()