I'm not seeing an obvious way to clean out compila...
# code-review
r
I'm not seeing an obvious way to clean out compilation artifacts and start fresh; is there a cmake command for that? Is just removing all directories named "build" a correct thing to do?
a
Depending on the generated build system, there may be a "clean" target; it is also alright to just delete the build folder though!
It is best to use an out of source build:
Copy code
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo [ -DOSQUERY_TOOLCHAIN_SYSROOT=/opt/osquery-toolchain if on linux]

cmake --build build -j 4 [ --config RelWithDebInfo if you are building on Windows with msvc ]
If your changes have been committed and an in-source build was made, you can also reset the folder:
Copy code
# Make sure your changes are committed or they'll get lost!
git reset --hard
git clean -ffdx
You can also deinit all the submodules if you want to run the configure completely from scratch:
Copy code
git submodule deinit --force --all
r
Thanks!