From 831017c7ee2da3553bd642d5dd07655b8d817ed0 Mon Sep 17 00:00:00 2001 From: RoboticsYY Date: Sun, 10 Nov 2019 19:17:43 +0800 Subject: [PATCH] Suppress Wredundant-decls warnings --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 796e298..58bb37c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,9 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif() +# Disable Wredundant-decls warnings since rosidl generates redundant function declarations if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-redundant-decls") endif() find_package(ament_cmake REQUIRED)