-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
36 lines (30 loc) · 1.27 KB
/
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
.PHONY: clean build test coverage
MAKE_FLAGS=-j $$(nproc)
# ============================================================================ #
# BUILD
# ============================================================================ #
build:
@mkdir -p build/ && cd build/ && cmake -D CMAKE_BUILD_TYPE=Release ..
# ============================================================================ #
# clean
# ============================================================================ #
clean:
@rm -r -f build/
# ============================================================================ #
# TEST
# ============================================================================ #
TEST_C_FLAGS = "-g -O2"
test:
@mkdir -p build/
@cd build/ && cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_FLAGS=$(TEST_C_FLAGS) -D CMAKE_CXX_FLAGS=$(TEST_C_FLAGS) ..
@cd build/ && make $(MAKE_FLAGS) test_unit
@./build/test/test_unit --reporter=info --colorizer=light
# ============================================================================ #
# MAIN for console debugging
# ============================================================================ #
main:
@mkdir -p build/
@cd build/ && cmake -D CMAKE_BUILD_TYPE=Debug ..
@cd build/ && make $(MAKE_FLAGS) qs_main
@echo "" && echo ""
@./build/src/qs_main