Skip to content

Commit

Permalink
Disable zero-variadic-macro-arguments warning when using clang. (#768)
Browse files Browse the repository at this point in the history
* Disable gnu-zero-variadic-macro-arguments warning on clang.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette authored Sep 13, 2023
1 parent d66b6db commit 3491f4f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rosidl_typesupport_introspection_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ if(BUILD_TESTING)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# When building under Clang, the "TYPED_TEST_SUITE" macros in the tests print the following
# warning: "must specify at least one argument for '...' parameter of variadic macro".
# Since this isn't really a problem, and will be allowed under C++20, just disable the warning.
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
endif()

find_package(rosidl_cmake REQUIRED)
find_package(rosidl_generator_c REQUIRED)
Expand Down

0 comments on commit 3491f4f

Please sign in to comment.