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

CMake warning on ${Boost_INCLUDE_DIRS}

asked 2016-12-30 11:21:00 -0500

bluehash gravatar image

I'm unable to get rid of include directory warnings during a catkin_make.

One of my packages is dependent on boost. I made sure to use find_package so that the include dirs variables get populated, but still get warnings during a build...although boost is discovered during the build. See warning at the end of the post. Thanks.

cmake_minimum_required(VERSION 2.8.3)
project(test)

# search for everything we need to build the package
find_package(catkin REQUIRED COMPONENTS
  roscpp
  sensor_msgs
  std_msgs
)

# since we need boost search it as well
# find_package makes the ${..._INCLUDE_DIRS} ${..._LIBRARIES} variables we use later
find_package(Boost REQUIRED COMPONENTS system thread)

# export the dependencis of this package for who ever depends on us
catkin_package(
  INCLUDE_DIRS include
  CATKIN_DEPENDS roscpp sensor_msgs std_msgs 
  DEPENDS boost
)

# tell catkin where to find the headers for this project
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

# make the executables
add_executable( test_node src/test.cpp )

add_dependencies( test_node   ${catkin_EXPORTED_TARGETS} )

target_link_libraries( test_node  ${catkin_LIBRARIES} ${Boost_LIBRARIES} )

Warning:

-- +++ processing catkin package: 'test'
-- ==> add_subdirectory(test)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'boost' but neither 'boost_INCLUDE_DIRS' nor
  'boost_LIBRARIES' is defined.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-12-30 11:26:33 -0500

spmaniato gravatar image

Try DEPENDS Boost (capitalized)

edit flag offensive delete link more

Comments

Thanks. That was it.

bluehash gravatar image bluehash  ( 2017-01-03 14:38:03 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-12-30 11:21:00 -0500

Seen: 2,202 times

Last updated: Dec 30 '16