forked from RoboJackets/rrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
33 lines (26 loc) · 1.09 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
all:
mkdir -p build
cd build && cmake .. -DCMAKE_INSTALL_PREFIX:PATH="" -GNinja && ninja
install: all
cd build && ninja install
run: all
build/rrt-viewer
debug: all
gdb build/rrt-viewer
tests: test-cpp
build/test-cpp
test-cpp:
mkdir -p build
cd build && cmake --target test-cpp .. -GNinja && ninja test-cpp
clean:
rm -rf build
STYLIZE_DIFFBASE ?= master
STYLE_EXCLUDE_DIRS=build third_party
# automatically format code according to our style config defined in .clang-format
pretty:
@stylize --diffbase=$(STYLIZE_DIFFBASE) --clang_style=file --yapf_style=.style.yapf --exclude_dirs $(STYLE_EXCLUDE_DIRS)
# check if everything in our codebase is in accordance with the style config defined in .clang-format
# a nonzero exit code indicates that there's a formatting error somewhere
checkstyle:
@printf "Run this command to reformat code if needed:\n\ngit apply <(curl $${LINK_PREFIX:-file://}clean.patch)\n\n"
@stylize --diffbase=$(STYLIZE_DIFFBASE) --clang_style=file --yapf_style=.style.yapf --exclude_dirs $(STYLE_EXCLUDE_DIRS) --check --output_patch_file="$${CIRCLE_ARTIFACTS:-.}/clean.patch"