Skip to content

Commit 3491f4f

Browse files
authored
Disable zero-variadic-macro-arguments warning when using clang. (#768)
* Disable gnu-zero-variadic-macro-arguments warning on clang. Signed-off-by: Chris Lalancette <[email protected]>
1 parent d66b6db commit 3491f4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rosidl_typesupport_introspection_tests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ if(BUILD_TESTING)
1515
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1616
add_compile_options(-Wall -Wextra -Wpedantic)
1717
endif()
18+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
19+
# When building under Clang, the "TYPED_TEST_SUITE" macros in the tests print the following
20+
# warning: "must specify at least one argument for '...' parameter of variadic macro".
21+
# Since this isn't really a problem, and will be allowed under C++20, just disable the warning.
22+
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
23+
endif()
1824

1925
find_package(rosidl_cmake REQUIRED)
2026
find_package(rosidl_generator_c REQUIRED)

0 commit comments

Comments
 (0)