Makefile 677 Bytes
Newer Older
1
.PHONY: tree ln install build clean test format
2
3
4
5
6
7
8
9
10
11
12

tree:
	@tree --prune -I "__pycache__|*.egg-info|*.so|build"

ln:
	@rm -rf build && cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CUDA_COMPILER=nvcc -B build && rm -rf compile_commands.json && ln -s build/compile_commands.json compile_commands.json

install:
	@pip install -e .

build:
13
	@export MAX_JOBS=$(nproc) && python3 setup.py bdist_wheel
14
15
16
17
18
19

clean:
	@rm -rf build dist *.egg-info

test:
	@pytest tests/
20
21

format:
22
	@find src tests -name '*.cc' -o -name '*.cu' -o -name '*.cuh' -o -name '*.h' -o -name '*.hpp' | xargs clang-format -i && find src tests -name '*.py' | xargs isort && find src tests -name '*.py' | xargs black