From afb949a417ce61787a449dfe9de52dd40816d14c Mon Sep 17 00:00:00 2001 From: gabime Date: Thu, 5 Dec 2019 17:44:38 +0200 Subject: [PATCH] CMake: - Allow non fatal security wanrnings for msvc 2015 and below --- cmake/utils.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index f7551f1c..f16a908d 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -29,7 +29,10 @@ function(spdlog_enable_warnings target_name) target_compile_options(${target_name} PRIVATE $<$,$,$>: -Wall -Wextra -Wconversion -pedantic -Wfatal-errors> - $<$:/W4 /WX>) + $<$:/W4>) + if(MSVC_VERSION GREATER_EQUAL 1910) #Allow non fatal security wanrnings for msvc 2015 + target_compile_options(${target_name} PRIVATE /WX) + endif() endfunction()