catkin_tools icon indicating copy to clipboard operation
catkin_tools copied to clipboard

remove leading and trailing ':' in CMAKE_PREFIX_PATH

Open lucasw opened this issue 3 years ago • 0 comments

I had some CMAKE_PREFIX_PATH modifications like the following that resulted in leading :

export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/my/path/...

and the result is that :: gets baked into the CMAKE_PREFIX_PATH later, but then a mismatch occurs:

WARNING: Your current environment's CMAKE_PREFIX_PATH is different from the cached CMAKE_PREFIX_PATH used the last
time this workspace was built.

If you want to use a different CMAKE_PREFIX_PATH you should call `catkin clean` to remove all references to the previous
CMAKE_PREFIX_PATH.

Cached CMAKE_PREFIX_PATH:
	/home/lucasw/base_catkin_ws/devel:/home/lucasw/other/install:/home/lucasw/other/install/lib/cmake
Current CMAKE_PREFIX_PATH:
	/home/lucasw/base_catkin_ws/devel::/home/lucasw/other/install:/home/lucasw/other/install/lib/cmake

so added strip(':') everywhere CMAKE_PREFIX_PATH is loaded from the environment

lucasw avatar May 16 '22 18:05 lucasw