Skip to content

Commit 9135d73

Browse files
committed
Move performance tests to a different target
1 parent 4fd868e commit 9135d73

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ LDFLAGS := $(LDFLAGS)
44

55
DEPS := include/array/array.h include/array/ein_reduce.h include/array/image.h include/array/matrix.h include/array/z_order.h
66

7-
TEST_SRC := $(filter-out test/errors.cpp, $(wildcard test/*.cpp))
7+
TEST_SRC := $(filter-out test/errors.cpp test/performance.cpp, $(wildcard test/*.cpp))
8+
PERFORMANCE_SRC := test/performance.cpp test/main.cpp
89
TEST_OBJ := $(TEST_SRC:%.cpp=obj/%.o)
10+
PERFORMANCE_OBJ := $(PERFORMANCE_SRC:%.cpp=obj/%.o)
911

1012
# Note that .cu files are automatically compiled by clang as CUDA.
1113
# Other extensions will need "-x cuda".
@@ -19,6 +21,10 @@ bin/test: $(TEST_OBJ)
1921
mkdir -p $(@D)
2022
$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm
2123

24+
bin/performance: $(PERFORMANCE_OBJ)
25+
mkdir -p $(@D)
26+
$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm
27+
2228
cuda_build_test: $(CUDA_TEST_SRC) $(DEPS)
2329
$(CXX) -Iinclude -c $< $(CFLAGS) $(CXXFLAGS) --cuda-gpu-arch=sm_52 -nocudalib -nocudainc -emit-llvm
2430
# TODO: Figure out how to run this build test to produce outputs in bin/ or obj/
@@ -32,3 +38,6 @@ clean:
3238
test: bin/test
3339
@! $(CXX) -Iinclude -c test/errors.cpp -std=c++14 -Wall -ferror-limit=0 2>&1 | grep "error:" | grep array.h && echo "Errors test success"
3440
bin/test $(FILTER)
41+
42+
performance: bin/performance
43+
bin/performance $(FILTER)

0 commit comments

Comments
 (0)