mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-14 05:15:36 +02:00
Build tests in Makefile
This commit is contained in:
@@ -6,6 +6,7 @@ MKDIR = mkdir -p
|
||||
CPP = g++
|
||||
CPPFLAGS = -Wall -fPIC -pthread -std=c++1y -I./include -I${CONDA_PREFIX}/include
|
||||
LDLIBS = -L/usr/lib64 -L${CONDA_PREFIX}/lib -lzmq -lhdf5 -lhdf5_hl -lhdf5_cpp -lhdf5_hl_cpp -lboost_system -lboost_regex -lboost_thread -lpthread
|
||||
LDLIBS_TEST = -lgtest_main -lgtest
|
||||
LDFLAGS = -shared
|
||||
|
||||
UNAME := $(shell uname)
|
||||
@@ -21,6 +22,7 @@ SRCS = $(wildcard $(SRC_DIR)/*.cpp)
|
||||
OBJS = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SRCS))
|
||||
|
||||
all: build_dirs libcpp_h5_writer
|
||||
test: build_dirs build_test
|
||||
|
||||
debug: CPPFLAGS += -DDEBUG_OUTPUT -g
|
||||
debug: all
|
||||
@@ -35,4 +37,7 @@ build_dirs:
|
||||
$(MKDIR) $(OBJ_DIR) $(BIN_DIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) $(BIN_DIR)
|
||||
rm -rf $(OBJ_DIR) $(BIN_DIR)
|
||||
|
||||
build_test: $(OBJS)
|
||||
$(CPP) $(CPPFLAGS) test/test_main.cpp $(OBJS) $(LDLIBS) $(LDLIBS_TEST) -o $(BIN_DIR)/execute_tests
|
||||
Reference in New Issue
Block a user