catkin how to search source install include directory before debian include directory?
I have a problem where I want to depend on a newer interface than what is in the debain install. To do this I am building the library I'm depending on (moveit) from source in an upstream workspace. However for some reason catkin/cmake is creating an include list that is always including the debian based includes first. This is from the compile step:
-isystem /home/tyler/workspace/ws_upstream/install/include
-I/opt/ros/melodic/include
Here is the documentation from the man page of g++
(-isystem is always searched after -I):
The lookup order is as follows:
1. For the quote form of the include directive, the directory of the current file is searched first.
2. For the quote form of the include directive, the directories specified by -iquote options are searched in left-to-right
order, as they appear on the command line.
3. Directories specified with -I options are scanned in left-to-right order.
4. Directories specified with -isystem options are scanned in left-to-right order.
5. Standard system directories are scanned.
6. Directories specified with -idirafter options are scanned in left-to-right order.
How can I instruct catkin/cmake to include my upstream include path first (by changing the -isystem to -I or something similar)?