Skip to content

Commit bfcf717

Browse files
authored
Fix compilation on Windows
Signed-off-by: Silvio Traversaro <[email protected]>
1 parent 1684cb9 commit bfcf717

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nav2_msgs/CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ find_package(action_msgs REQUIRED)
1313

1414
nav2_package()
1515

16-
# TODO(jwallace42): This is a work around for https://github.com/ros2/rosidl_typesupport_fastrtps/issues/28
17-
add_compile_options(-Wno-error=deprecated)
16+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
17+
# TODO(jwallace42): This is a work around for https://github.com/ros2/rosidl_typesupport_fastrtps/issues/28
18+
add_compile_options(-Wno-error=deprecated)
19+
endif()
1820

1921
rosidl_generate_interfaces(${PROJECT_NAME}
2022
"msg/CollisionMonitorState.msg"

0 commit comments

Comments
 (0)