1 Star 0 Fork 0

陈奕州/cpptrace

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
Jeremy Rifkin 提交于 2024-08-18 11:33 . Some makefile improvements
default: help
# The general philosophy and functionality of this makefile is shamelessly stolen from compiler explorer
help: # with thanks to Ben Rady
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: debug ## build in debug mode
build/configured-debug:
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
.PHONY: release
release: configure-release ## build in release mode (with debug info)
cmake --build build
.PHONY: debug-msvc
debug-msvc: ## build in debug mode
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
cmake --build build --config Debug
.PHONY: release-msvc
release-msvc: ## build in release mode (with debug info)
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCPPTRACE_BUILD_TESTING=On
cmake --build build --config RelWithDebInfo
.PHONY: clean
clean: ## clean
rm -rf build
.PHONY: test
test: debug ## test
cd build && ninja test
.PHONY: test-release
test-release: release ## test-release
cd build && ninja test
# .PHONY: test-msvc
# test-msvc: debug-msvc ## test
# cmake --build build --target RUN_TESTS --config Debug
# .PHONY: test-msvc-release
# test-msvc-release: release-msvc ## test-release
# cmake --build build --target RUN_TESTS --config Release
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Geoyee/cpptrace.git
[email protected]:Geoyee/cpptrace.git
Geoyee
cpptrace
cpptrace
dev

搜索帮助