Skip to content

Commit

Permalink
[cmake] Turn off -Werror=extra -Werror=pedantic (#360)
Browse files Browse the repository at this point in the history
In no universe should Werror be enabled in end-user builds (rather
than just developers local builds and CI checks), and certainly not
for warning categories that Drake's own CI doesn't even enable. We
don't want *this* repository to be a warning-catcher for Drake code.

The easy fix for now is to just turn off the overly broad warning
categories. This does not fix the bug that Werror=all is enabled for
builds triggered by downstream users.
  • Loading branch information
jwnimmer-tri authored Jul 9, 2024
1 parent 10f95c3 commit eff1806
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drake_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-error=deprecated-declarations)
add_compile_options(-Wall -Werror -Wno-error=deprecated-declarations)
endif()

find_package(ament_cmake_ros REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion drake_ros_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-error=deprecated-declarations)
add_compile_options(-Wall -Werror -Wno-error=deprecated-declarations)
endif()

find_package(ament_cmake_ros REQUIRED)
Expand Down

0 comments on commit eff1806

Please sign in to comment.