docs: add build instructions to README

This commit is contained in:
outfoxxed 2024-03-07 06:00:46 -08:00
parent 5ac04649aa
commit f32b4175fb
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 87 additions and 6 deletions

View file

@ -8,7 +8,7 @@ lint:
configure target='debug' *FLAGS='':
cmake -GNinja -B {{builddir}} \
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "Release" } }} \
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "RelWithDebInfo" } }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON {{FLAGS}}
ln -sf {{builddir}}/compile_commands.json compile_commands.json
@ -19,6 +19,8 @@ _configure_if_clean:
build: _configure_if_clean
cmake --build {{builddir}}
release: (configure "release") build
clean:
rm -f compile_commands.json
rm -rf {{builddir}}
@ -29,5 +31,5 @@ run *ARGS='': build
test *ARGS='': build
ctest --test-dir {{builddir}} --output-on-failure {{ARGS}}
install *ARGS='': clean (configure "release") build
install *ARGS='':
cmake --install {{builddir}} {{ARGS}}