-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
43 lines (34 loc) · 894 Bytes
/
Makefile
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
42
43
BUILD_DIR = build
TEST_DIR = test
all: configure build
.PHONY: configure
configure:
cmake -B $(BUILD_DIR) -S . -DCMAKE_BUILD_TYPE=Debug
.PHONY: build
build:
cmake --build $(BUILD_DIR)
.PHONY: docs
docs:
cmake -B $(BUILD_DIR) -S . -DBUILD_DOCS=ON -DBUILD_TESTING=OFF
cmake --build $(BUILD_DIR)
.PHONY: coverage
coverage:
cmake -B $(BUILD_DIR) -S . -DBUILD_DOCS=ON -DBUILD_TESTING=ON -DENABLE_COVERAGE=ON
cmake --build $(BUILD_DIR)
ctest --test-dir $(BUILD_DIR) --output-on-failure
.PHONY: release
release: clean
cmake -B $(BUILD_DIR) -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
$(MAKE) build
$(MAKE) install
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
.PHONY: install
install:
cmake --install $(BUILD_DIR)
.PHONY: test
test:
cmake -B $(BUILD_DIR) -S . -DBUILD_DOCS=OFF -DBUILD_TESTING=ON
cmake --build $(BUILD_DIR)
ctest --test-dir $(BUILD_DIR) --output-on-failure