Skip to content
Snippets Groups Projects
Commit 3e2b29f8 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

CHG: Add more options to Makefile

- build
- test
- clean
parent 6856a5e9
Branches
No related tags found
3 merge requests!41Release 0.3.0,!35Adapt for Conan 2,!34Adapt for Conan 2
......@@ -35,14 +35,39 @@ CLANG_TIDY_CMD = $(CLANG_TIDY) \
.PHONY: help
help:
@echo "Targets:"
@echo " conan-install - Install locally with Conan."
@echo " conan-install-debug - Install locally with Conan."
@echo " conan-install-release - Install locally with Conan."
@echo " format - auto-format the source files."
@echo " build-debug - Build the project in Debug mode."
@echo " build-release - Build the project in Release mode."
@echo " test-debug - Run the tests in Debug mode."
@echo " test-release - Run the tests in Release mode."
@echo " clean - Remove build directories."
conan-install:
conan install . -s "compiler.libcxx=libstdc++11"
.PHONY: conan-install
conan-install-debug:
conan install . -s "compiler.libcxx=libstdc++11" -s build_type=Debug --build=missing
conan-install-release:
conan install . -s "compiler.libcxx=libstdc++11" -s build_type=Release --build=missing
format:
$(CLANG_FORMAT) -i --verbose \
$$(find test/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in")
.PHONY: format
build-debug: conan-install-debug
cmake --preset conan-debug && cmake --build build/Debug
build-release: conan-install-release
cmake --preset conan-release && cmake --build build/Release
test-debug: build-debug
cd build/Debug && ctest
test-release: build-release
cd build/Release && ctest
clean:
rm -rf build
.PHONY: conan-install-debug conan-install-release build-debug build-release test-debug test-release
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment