ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can pass multiple "CMake configuration extra" files via catkin_package(CFG_EXTRAS) to be included when downstream packages find your package:

catkin_package(
  CFG_EXTRAS ${PROJECT_NAME}-extras.cmake
)

An example for such a file would be cmake/${PROJECT_NAME}-extras.cmake:

#  for older versions of clang, libstdc++ is used by default and we need to explicitly request libc++ instead
if(APPLE)
  set(CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
else()
  set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif ()