-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.53 KB
/
Makefile
File metadata and controls
55 lines (43 loc) · 1.53 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CMAKE ?= cmake
CTEST ?= ctest
BUILD_DIR ?= build
CONFIGURE_FLAGS ?= -DQDATA_BUILD_TESTS=ON -DQDATA_BUILD_EXAMPLES=ON
CTEST_FLAGS ?= --output-on-failure -V
QS_EXTENDED_TESTS ?= 1
ROWS ?=
REPS ?=
LICENSE_DIR ?= LICENSES
BENCH_ARGS :=
ifneq ($(strip $(ROWS)),)
BENCH_ARGS += $(ROWS)
endif
ifneq ($(strip $(REPS)),)
BENCH_ARGS += $(REPS)
endif
.PHONY: all configure example bench benchmark benchmark-build test test-extended get-license-files clean distclean
all: configure
$(CMAKE) --build $(BUILD_DIR)
configure:
$(CMAKE) -S . -B $(BUILD_DIR) $(CONFIGURE_FLAGS)
example: configure
$(CMAKE) --build $(BUILD_DIR) --target qdata_mtcars_roundtrip
benchmark-build: configure
$(CMAKE) --build $(BUILD_DIR) --target qdata_benchmark
# make benchmark ROWS=1000 REPS=1
benchmark: benchmark-build
./$(BUILD_DIR)/qdata_benchmark $(BENCH_ARGS)
test: configure
$(CMAKE) --build $(BUILD_DIR)
$(CTEST) --test-dir $(BUILD_DIR) $(CTEST_FLAGS)
test-extended: configure
$(CMAKE) --build $(BUILD_DIR)
QS_EXTENDED_TESTS=$(QS_EXTENDED_TESTS) $(CTEST) --test-dir $(BUILD_DIR) $(CTEST_FLAGS)
get-license-files:
@mkdir -p $(LICENSE_DIR)
curl -fsSL https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE
curl -fsSL https://raw.githubusercontent.com/Cyan4973/xxHash/dev/LICENSE -o $(LICENSE_DIR)/xxHash-BSD-2-Clause.txt
curl -fsSL https://raw.githubusercontent.com/Blosc/c-blosc/main/LICENSE.txt -o $(LICENSE_DIR)/BLOSC-BSD-3-Clause.txt
clean:
@if [ -d "$(BUILD_DIR)" ]; then $(CMAKE) --build $(BUILD_DIR) --target clean; fi
distclean:
$(CMAKE) -E rm -rf $(BUILD_DIR)