![]() Starting with a fresh build might resolve whatever awkward state has built up over time / based on what was done in the past. ![]() It is also to reproduce a problem using a fresh build before reporting it in a ticket. So this would be a case where deleting the whole build directory would help.Īnother case I would recommend deleting the build directory is when you run into problem you don't understand. ![]() Those wouldn't be cleaned up and could affect following builds even after the logic creating them has been removed. an earlier version of the package created some files in the build directory). Sometimes the build directory contains additional state from previous builds which might affect following builds (e.g. Passing -cmake-clean-first is a good way to ensure all files are being recompiled. On that first build you might see a compiler warning but on consecutive builds (assuming the files haven't changes) you wouldn't see the compiler warning again. Once a source file has been compiled it commonly isn't being recompiled until it (or any included headers)) changed. (There are ways to tell CMake that changing a specific non-CMake file should trigger a reconfigure.) So if you need the configure step to run again but CMake doesn't do it automatically you can either touch and included CMake file or just pass -cmake-force-configure.Ī case where you might want to invoke make clean is to recheck if you code has any compiler warnings. But sometimes your logic depends on additional/external state/files and you need CMake to run the configure step again. you have passed a definition before which you don't want to be set anymore moving forwardĬMake automatically runs the configure step when any included CMake file has changed.a previously found package should be searched again since you want it to be found/used from a different location.directories where specific package have been found and definitions passed using -D.Ī few examples when you want to use -cmake-clean-cache: CMake caches several information in the file CMakeCache.txt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |