# Configure the project and generate a native build system:
# Must re-run this command whenever any CMakeLists.txt file has been changed.
cmake -S ./ -B build/
# Compile and build the project:
# rebuild only files that are modified since the last build
cmake --build build/
# or rebuild everything from scracth
cmake --build build/ --clean-first
# to see verbose output, do:
cmake --build build/ --verbose
# Run program:
./build/app/shell-app
# Clean
cmake --build build/ --target clean
# Clean and start over:
rm -rf build/
What happens when the executable is linked statically? Does Valgrind still detect those same bugs? Why or why not.
Yes, if the file is linked/mentioned in the cmakelists.txt file as a source file.