-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (31 loc) · 1.14 KB
/
Makefile
File metadata and controls
43 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# Makefile to drive cmake operations
# https://github.com/d-e-e-p/fixed-size-string-buffer
# Copyright (c) 2023 Sandeep <[email protected]>
#
.PHONY: *
.DEFAULT_GOAL := help
INSTALL_LOCATION := ~/.local
CPM_SOURCE_CACHE:= .cache/CPM
#MAKEFLAGS += -j4
export CMAKE_BUILD_PARALLEL_LEVEL:= 4
# SHELL=/bin/bash -vx # for debug
include cmake/utils.mk
# Use the COMPARE_VERSIONS function to set the CMAKE_FRESH variable
# CMAKE_FRESH := $(shell python3 -c "$(COMPARE_VERSIONS_PY)")
BROWSER := python3 -c "$$BROWSER_PYSCRIPT"
help: ## this message
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
all: clean debug release test
clean: ## remove build dir
rm -rf build/
debug: ## create debug version of examples examples
rm -rf ./build/debug/CMakeCache.txt
cmake -S examples -B build/debug -DCMAKE_BUILD_TYPE=Debug
cmake --build build/debug --config Debug
release: ## create optimized version of examples
rm -rf ./build/release/CMakeCache.txt
cmake -S examples -B build/release -DCMAKE_BUILD_TYPE=Release
cmake --build build/release --config Release
test: release ## exercise all examples and compare output against validated version
pytest -v