From 288b32a31a4e3f415a267a0b843d03378281585f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Fri, 26 Apr 2024 11:56:18 +0200 Subject: [PATCH] Removed spdlog_vendor warnings (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero (cherry picked from commit 4510d9ab4389f84daac77210f3fdf8aab372b938) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f5efa0..539c4bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ find_package(spdlog 1.5.0 QUIET) # spdlog needs to be told to do so explicitly. set(BUILD_SHARED_LIBS TRUE CACHE BOOL "Build shared libraries") +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}") +endif() + ament_vendor(spdlog_vendor SATISFIED ${spdlog_FOUND} VCS_URL https://github.com/gabime/spdlog.git @@ -17,6 +21,7 @@ ament_vendor(spdlog_vendor CMAKE_ARGS -DSPDLOG_BUILD_TESTS:BOOL=OFF -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF + "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" ) if(BUILD_TESTING)