forked from cisco/sframe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 1005 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
# This is just a convenience Makefile to avoid having to remember
# all the CMake commands and their arguments.
# Set CMAKE_GENERATOR in the environment to select how you build, e.g.:
# CMAKE_GENERATOR=Ninja
BUILD_DIR=build
CLANG_FORMAT=clang-format -i
TEST_VECTOR_DIR=./build/test
TEST_GEN=./build/cmd/test_gen/test_gen
.PHONY: all tidy test clean cclean format
all: ${BUILD_DIR}
cmake --build ${BUILD_DIR} --target sframe
${BUILD_DIR}: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug .
tidy:
cmake -B${BUILD_DIR} -DCLANG_TIDY=ON -DCMAKE_BUILD_TYPE=Debug .
test: ${BUILD_DIR} test/*
cmake --build ${BUILD_DIR} --target sframe_test
cd ${TEST_VECTOR_DIR} && ctest
clean:
cmake --build ${BUILD_DIR} --target clean
cclean:
rm -rf ${BUILD_DIR}
format:
find include -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}
find src -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}
find test -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}