catkin icon indicating copy to clipboard operation
catkin copied to clipboard

gtest includes should not emit warnings

Open stertingen opened this issue 4 years ago • 0 comments

When having some compiler warnings enabled, building tests may lead to very verbose compiling. This could be resolved by including the gtest headers as system includes.

The relevant part is here: https://github.com/ros/catkin/blob/noetic-devel/cmake/test/gtest.cmake#L178

The line should be (I think):

  # create the executable, with basic + gtest/gmock build flags
  include_directories(SYSTEM ${${type_upper}_INCLUDE_DIRS})
  link_directories(${${type_upper}_LIBRARY_DIRS})

Lots of warnings are emitted on Melodic, so if this is going to be fixed, I'd love to see a backport.

stertingen avatar Feb 18 '21 14:02 stertingen