Skip to content

Commit

Permalink
turn all warnings into errors but ignore type punning for franka_hard…
Browse files Browse the repository at this point in the history
…ware
  • Loading branch information
christian-rauch committed Oct 30, 2024
1 parent b71db91 commit b1b5158
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion franka_example_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

option(CHECK_TIDY "Adds clang-tidy tests" OFF)
Expand Down
2 changes: 1 addition & 1 deletion franka_gripper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion franka_hardware/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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

option(CHECK_TIDY "Adds clang-tidy tests" OFF)
Expand Down
4 changes: 3 additions & 1 deletion franka_hardware/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ find_package(ament_cmake_gmock REQUIRED)

ament_add_gmock(${PROJECT_NAME}_test franka_hardware_interface_test.cpp)
target_include_directories(${PROJECT_NAME}_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)

target_link_libraries(${PROJECT_NAME}_test ${PROJECT_NAME})

# ignore type punning via 'reinterpret_cast<double*>(&[...])'
target_compile_options(${PROJECT_NAME}_test PRIVATE -Wno-error=strict-aliasing)
2 changes: 1 addition & 1 deletion franka_robot_state_broadcaster/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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

option(CHECK_TIDY "Adds clang-tidy tests" OFF)
Expand Down
2 changes: 1 addition & 1 deletion franka_semantic_components/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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

option(CHECK_TIDY "Adds clang-tidy tests" OFF)
Expand Down
2 changes: 1 addition & 1 deletion integration_launch_testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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)
add_compile_options(-Werror -Wall -Wextra -Wpedantic)
endif()

# find dependencies
Expand Down

0 comments on commit b1b5158

Please sign in to comment.