Commit 8afe18f1 authored by gabime's avatar gabime

Minor improvement CMakeLists to use generators

parent 90f348d2
...@@ -25,12 +25,10 @@ endfunction() ...@@ -25,12 +25,10 @@ endfunction()
# Turn on warnings on the given target # Turn on warnings on the given target
function(spdlog_enable_warnings target_name) function(spdlog_enable_warnings target_name)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") target_compile_options(${target_name} PRIVATE
target_compile_options(${target_name} PRIVATE -Wall -Wextra -Wconversion -pedantic -Wfatal-errors) $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
endif() -Wall -Wextra -Wconversion -pedantic -Wfatal-errors>
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>)
target_compile_options(${target_name} PRIVATE /W4 /WX )
endif()
endfunction() endfunction()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment