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
the first build succeeds. Sometimes I want to reset CMake cache by deleting build/CMakeCache.txt and rebuild the workspace. But when I do that, the custom --cmake-args are all lost, even if they're again passed on the command line (so in this case, the devel space used will be build/devel, which I find even weirder).
After some debugging, I know why is that: catkin_make checks whether it needs to run full cmake again, and does that by looking at Makefile and catkin_make.cache files in build space. CMakeLists.txt is not included. So catkin_make decides full re-run is not needed, and instead of calling the top-level CMakeLists.txt, it only runs make cmake_check_build_system. But this call loses all the custom --cmake-args passed to catkin_make. CMake thus runs again, but without the custom arguments. And its results are cached, so all subsequent calls also use this wrong environment.
The workaround is clear. Always also delete either Makefile or catkin_make.cache (or both) if you're deleting CMakeCache.txt.
The question is whether the invalidation logic should not also look at CMakeCache.txt and run the full train if it's missing.
The text was updated successfully, but these errors were encountered:
If I call e.g.
the first build succeeds. Sometimes I want to reset CMake cache by deleting
build/CMakeCache.txt
and rebuild the workspace. But when I do that, the custom --cmake-args are all lost, even if they're again passed on the command line (so in this case, the devel space used will bebuild/devel
, which I find even weirder).After some debugging, I know why is that: catkin_make checks whether it needs to run full cmake again, and does that by looking at
Makefile
andcatkin_make.cache
files in build space.CMakeLists.txt
is not included. Socatkin_make
decides full re-run is not needed, and instead of calling the top-levelCMakeLists.txt
, it only runsmake cmake_check_build_system
. But this call loses all the custom--cmake-args
passed tocatkin_make
. CMake thus runs again, but without the custom arguments. And its results are cached, so all subsequent calls also use this wrong environment.The workaround is clear. Always also delete either
Makefile
orcatkin_make.cache
(or both) if you're deletingCMakeCache.txt
.The question is whether the invalidation logic should not also look at
CMakeCache.txt
and run the full train if it's missing.The text was updated successfully, but these errors were encountered: