-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 730 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 730 Bytes
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
CXX := clang++
LINKER := ld64.lld
ENABLE_ASAN := ON
ENABLE_DCHECK := ON
CMAKE_BUILD_TYPE ?= RelWithDebInfo
CMAKE_FLAGS := \
-DCMAKE_LINKER=$(LINKER) \
-DCMAKE_CXX_COMPILER=$(CXX) \
-DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_COLOR_DIAGNOSTICS=ON \
-DENABLE_ASAN=$(ENABLE_ASAN) \
-DENABLE_DCHECK=$(ENABLE_DCHECK)
.PHONY: test clean build
config:
@mkdir -p build
cmake -S . -B build -G Ninja $(CMAKE_FLAGS)
build/build.ninja: CMakeLists.txt cmake/dependencies.cmake
@mkdir -p build
cmake -S . -B build -G Ninja $(CMAKE_FLAGS)
build: build/build.ninja
cmake --build build
clean:
rm -rf build
install: build
uv pip install -e .
test: build install
uv run pytest -s