How to clear CMake cache in Clion?

前端 未结 2 1197
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 09:24

I am currently trying to swap static libraries in one of my projects which requires swapping find_package() commands for explicit links to static libraries. One of the probl

2条回答
  •  长情又很酷
    2020-12-16 09:45

    There is some magic with this cache. I got bad value for one variable once: by some reason cmake found some wrecked freetype includes inside mono.framework (another reason to dislike mono...) and tried to use them to compile my project. Obviously compilation failed.

    I tried to remove CMakeCache.txt and rebuild project but incorrect path come back. Even after I removed mono.framework dir!

    The solution was to remove incorrect line from the cache and restart the build. After that cmake got the correct path and build succeded.

    UPD: After I "reload cmake project" incorrect value came back. Deleting everything in $HOME/Library/Caches/clion11/cmake/generated/ dir (for OS X) seems to finally solve the issue.

提交回复
热议问题