From 233fcf02a02041da1cc2c7395b7a5309aac58392 Mon Sep 17 00:00:00 2001 From: "Buissart-Dubois, Julien" Date: Wed, 22 Jul 2020 09:56:03 +0200 Subject: [PATCH] Changing inherited headers Setting spdlog header inheritance in system mod to avoid that more drastic warnings policies raise warning in project including spdlog. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e189cf5c..fe3f91a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,8 +143,10 @@ endif() add_library(spdlog::spdlog ALIAS spdlog) target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB) -target_include_directories(spdlog PUBLIC "$" - "$") +target_include_directories(spdlog PRIVATE "$" + "$") +target_include_directories(spdlog SYSTEM INTERFACE "$" + "$") target_link_libraries(spdlog PUBLIC Threads::Threads) spdlog_enable_warnings(spdlog) @@ -162,8 +164,8 @@ endif() add_library(spdlog_header_only INTERFACE) add_library(spdlog::spdlog_header_only ALIAS spdlog_header_only) -target_include_directories(spdlog_header_only INTERFACE "$" - "$") +target_include_directories(spdlog_header_only SYSTEM INTERFACE "$" + "$") target_link_libraries(spdlog_header_only INTERFACE Threads::Threads) # ---------------------------------------------------------------------------------------