`missing_file` errors thrown for installing dynamic content.
seanyen opened this issue · 2 comments
seanyen commented
When I am installing content dynamically generated at CMake configuration time, it triggers missing_file
errors from catkin_lint
.
For example, I have the following code:
include(GenerateExportHeader)
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME rviz/${PROJECT_NAME}_export.h)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/rviz/${PROJECT_NAME}_export.h
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
And it triggers the errors:
catkin_lint /root/rviz
rviz: src/rviz/CMakeLists.txt(183): error: install() needs missing file '${PROJECT_BUILD_DIR}/src/rviz/rviz/rviz_export.h'
rviz: src/rviz/default_plugin/CMakeLists.txt(87): error: install() needs missing file '${PROJECT_BUILD_DIR}/src/rviz/default_plugin/rviz/default_plugin/rviz_default_plugin_export.h'
What's the recommended way to accommodate this common pattern? Currently I am using #catkin_lint: missing_file
to workaround it. (See ros-visualization/rviz#1335)
roehling commented
catkin_lint
does not know about GenerateExportHeader
yet. I'll add support for it.
roehling commented
For the record, your workaround is good. I recommend using #catkin_lint: ignore_once missing_file
right before the install()
statement for minimal impact.