ros generate checking headers before generating message headers
I am generating a message in this package. Then using that message in a header file in the same package. This builds on my system, but not on others (see TravisCI build failures). It seems that cmake/catkin is searching for the header file to be generated before it is generated.
Not sure why this builds for me but not for others. Possibly there is some cached header file in the build
directory that my preprocessor is able to reference. Anyways, what is wrong here?
CMakeLists.txt for the project shown below.
cmake_minimum_required(VERSION 2.8.3)
project(terpcopter_common)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
message_generation
std_msgs
)
## Generate messages in the 'msg' folder
add_message_files(
FILES
Health.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
terpcopter_common
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES terpcopter_common
CATKIN_DEPENDS message_runtime
# DEPENDS system_lib
)
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include)
## Declare a C++ library
add_library(terpcopter_common
src/${PROJECT_NAME}/system.cpp
src/${PROJECT_NAME}/tc_node.cpp
src/${PROJECT_NAME}/tc_manager_node.cpp
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)