You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ colcon build --symlink-install --event-handlers console_direct+ --cmake-args -C /mnt/mervin/workspaces/devel/camera/initial_cache.cmake
loading initial cache file /mnt/mervin/workspaces/devel/camera/initial_cache.cmake
Re-run cmake no build system arguments
CMake Error: The source directory "/mnt/mervin/workspaces/devel/camera/initial_cache.cmake" is a file, not a directory.
So, loads fine, but fails because it confuses the initial cache path with the source directory. Digging into an example of the actual command that colcon uses for cmake (use --log-level=debug with colcon):
[0.214s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/mnt/mervin/workspaces/devel/camera/build/ueye_cam' returned '1': CMAKE_PREFIX_PATH=/opt/ros/dashing /usr/bin/cmake /mnt/mervin/workspaces/devel/camera/src/ueye_cam -C /mnt/mervin/workspaces/devel/camera/initial_cache.cmake -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/mnt/mervin/workspaces/devel/camera/install/ueye_cam
Here the source directory is specified prior to the -C argument (as well as the other arguments). While this works for other cmake args, it does not work for the -C argument. In addition, this would appear not to be a cmake problem - cmake does in fact suggest options should come first:
stonier
changed the title
Attempting to use a cmake initial cache file via '-C' with --cmake-args fails
A cmake initial cache file via '-C' with --cmake-args fails
May 14, 2021
So, loads fine, but fails because it confuses the initial cache path with the source directory. Digging into an example of the actual command that colcon uses for cmake (use
--log-level=debug
with colcon):Here the source directory is specified prior to the
-C
argument (as well as the other arguments). While this works for other cmake args, it does not work for the-C
argument. In addition, this would appear not to be a cmake problem - cmake does in fact suggest options should come first:Q: Are there any ramifications to moving the specified source directory to the end of this list of arguments?
The text was updated successfully, but these errors were encountered: