-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (31 loc) · 844 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
BUILD_DIR=build
SRC_DIR=subseq
CPP_SRC_DIR=subseq/cpp_sources
PYTHON_TEST_DIR=tests
CPP_TEST_BUILD_DIR=test_build
.PHONY: build tests tests_cpp
build: cmake_cpp_sources
make -C ${CPP_SRC_DIR}
python3 setup.py build_ext --inplace
clean:
rm -rf ${BUILD_DIR}/
rm -f ${SRC_DIR}/*.cpp
cmake_cpp_sources:
cmake ${CPP_SRC_DIR} -B ${CPP_SRC_DIR}
lint: lint_cpp lint_python
lint_cpp: cmake_cpp_sources
make -C ${CPP_SRC_DIR} clang-format
make -C ${CPP_SRC_DIR} clang-tidy
lint_python:
black ${PYTHON_TEST_DIR}
lint_check: cmake_cpp_sources
make -C ${CPP_SRC_DIR} clang-format-check
black --check ${PYTHON_TEST_DIR}
test: test_cpp test_python
test_python: build
pytest tests
test_cpp:
mkdir -p ${CPP_TEST_BUILD_DIR}
cmake -B ${CPP_TEST_BUILD_DIR} -S .
make -C ${CPP_TEST_BUILD_DIR}
make -C ${CPP_TEST_BUILD_DIR} test ARGS='-VV'