CMake warning on ${Boost_INCLUDE_DIRS}
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.