Skip to content

Commit afd2651

Browse files
committed
add tests to all in makefile
1 parent 3698b14 commit afd2651

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ NVCCFLAGS = -O2
55
CUDA_PATH = /opt/cuda
66
INCLUDES = -I$(CUDA_PATH)/include
77
LDFLAGS = -L$(CUDA_PATH)/lib64 -lcudart
8+
GTEST_LDFLAGS = -lgtest -lgtest_main -lpthread
89

9-
all: warp_bitonic_sort cpu_bitonic_sort
10+
all: warp_bitonic_sort cpu_bitonic_sort test_bitonic_sort
1011

1112
warp_bitonic_sort: main.o warp_bitonic_sort.o
1213
$(CXX) $^ -o $@ $(LDFLAGS)
1314

1415
cpu_bitonic_sort: cpu_bitonic_sort.cpp
1516
$(CXX) $^ -o $@
1617

18+
test_bitonic_sort: test_bitonic_sort.o warp_bitonic_sort.o
19+
$(NVCC) $^ -o $@ $(LDFLAGS) $(GTEST_LDFLAGS)
20+
1721
main.o: main.cpp warp_bitonic_sort.cuh
1822
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
1923

0 commit comments

Comments
 (0)