Title
#code-review
r

Robin Powell

10/04/2021, 9:53 PM
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

alessandrogario

10/04/2021, 10:19 PM
Depending on the generated build system, there may be a "clean" target; it is also alright to just delete the build folder though!
10:20 PM
It is best to use an out of source build:
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 ]
10:21 PM
If your changes have been committed and an in-source build was made, you can also reset the folder:
# Make sure your changes are committed or they'll get lost!
git reset --hard
git clean -ffdx
10:22 PM
You can also deinit all the submodules if you want to run the configure completely from scratch:
git submodule deinit --force --all
r

Robin Powell

10/04/2021, 10:45 PM
Thanks!