Ask Your Question
0

catkin_make --install headers search order

asked 2015-04-13 09:59:21 -0500

Huy Cong gravatar image

Hi, Let's say I have 2 packages A & B of which package B use some of the package A headers.

I use catkin_make_isolated --install to build my packages. Package A is builded first, then its headers is installed to install_isolated directory using:

install(DIRECTORY include/${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)

The headers is then visible for package B to use and the compilation runs just fine.

The problem is that each time I modified headers file of package A, its source file looks for the headers file in install_isolated directory but not the ones in include/{package A} of source directory. The only solution I have in mind is delete the install_isolated/{package A}/include directory and recompile, but it is very inconvenient, not portable and not standalone runnable.

Is there a way to force source files to look for headers in its source location but not in install space, but using always catkin_make_isolated --install ?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-13 12:02:54 -0500

Dirk Thomas gravatar image

I assume after building the first time you have sourced the setup file in the same shell and later try to build a second time from within the same shell?

Please try to use a separate shell for sourcing the setup. Then rebuilding the workspace in the first shell (which has not sourced the setup of that workspace) should work fine.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-13 09:59:21 -0500

Seen: 82 times

Last updated: Apr 13 '15