Some makefile improvements
This commit is contained in:
parent
7621f2b277
commit
3f68171d0b
22
Makefile
22
Makefile
@ -8,14 +8,28 @@ help: # with thanks to Ben Rady
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: debug ## build in debug mode
|
build: debug ## build in debug mode
|
||||||
|
|
||||||
.PHONY: debug
|
build/configured-debug:
|
||||||
debug: ## build in debug mode
|
|
||||||
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
|
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
|
||||||
|
rm -f build/configured-release
|
||||||
|
touch build/configured-debug
|
||||||
|
|
||||||
|
build/configured-release:
|
||||||
|
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
|
||||||
|
rm -f build/configured-debug
|
||||||
|
touch build/configured-release
|
||||||
|
|
||||||
|
.PHONY: configure-debug
|
||||||
|
configure-debug: build/configured-debug
|
||||||
|
|
||||||
|
.PHONY: configure-release
|
||||||
|
configure-release: build/configured-release
|
||||||
|
|
||||||
|
.PHONY: debug
|
||||||
|
debug: configure-debug ## build in debug mode
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: ## build in release mode (with debug info)
|
release: configure-release ## build in release mode (with debug info)
|
||||||
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
|
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
|
||||||
.PHONY: debug-msvc
|
.PHONY: debug-msvc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user