Commit c60f7907 authored by Jan Kundrát's avatar Jan Kundrát

Do not impose -Wextra -Wconversion etc on library users

I had to nuke the flags targetting spdlog_header_only because in CMake,
an interface target apparently really only supports the INTERFACE
option.

As I am only targeting Linux, the MSVC changes rely on spdlog's CI and
manual code review. That said, it makes sense to also stop forcing these
options on third party code, assuming that the CMake installations work
the same on Windows.

Fixes #1104
parent e0b4ec54
...@@ -80,12 +80,10 @@ target_link_libraries(spdlog_header_only INTERFACE Threads::Threads) ...@@ -80,12 +80,10 @@ target_link_libraries(spdlog_header_only INTERFACE Threads::Threads)
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
if(SPDLOG_MASTER_PROJECT) if(SPDLOG_MASTER_PROJECT)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
target_compile_options( spdlog PUBLIC -Wall -Wextra -Wconversion -pedantic -Wfatal-errors) target_compile_options( spdlog PRIVATE -Wall -Wextra -Wconversion -pedantic -Wfatal-errors)
target_compile_options( spdlog_header_only INTERFACE -Wall -Wextra -Wconversion -pedantic -Wfatal-errors)
endif() endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options( spdlog PUBLIC /W3 /WX ) target_compile_options( spdlog PRIVATE /W3 /WX )
target_compile_options( spdlog_header_only INTERFACE /W3 /WX)
endif() endif()
include(cmake/sanitizers.cmake) include(cmake/sanitizers.cmake)
......
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