-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
26 lines (20 loc) · 1.23 KB
/
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
CXX?=g++
all: bin/runtests bin/runtests_googlebench
bin/%.o: %.cpp
@mkdir -p bin
$(CXX) -O3 -std=c++20 -c -W -Wall $(CXXFLAGS-$(basename $@)) -o$@ $<
bin/runtests: bin/main.o bin/exceptions.o bin/leaf.o bin/expected.o bin/herbceptionemulation.o bin/herbceptions.o bin/outcome.o bin/baseline.o
$(CXX) -o$@ $^ -lpthread
bin/benchmark/src/libbenchmark.a:
@mkdir -p bin/benchmark
cmake -E chdir bin/benchmark cmake -DBENCHMARK_ENABLE_TESTING=OFF -DBENCHMARK_ENABLE_EXCEPTIONS=OFF -DCMAKE_BUILD_TYPE=Release ../../thirdparty/benchmark
cmake --build bin/benchmark --config Release --target benchmark
bin/runtests_googlebench: bin/main_googlebench.o bin/exceptions.o bin/leaf.o bin/expected.o bin/herbceptionemulation.o bin/herbceptions.o bin/outcome.o bin/baseline.o bin/benchmark/src/libbenchmark.a
$(CXX) -o$@ $^ $(LDFLAGS-$(basename $@))
CXXFLAGS-bin/leaf:=-w -fno-exceptions -O2 -DNDEBUG -DBOOST_LEAF_CFG_DIAGNOSTICS=0 -DBOOST_LEAF_CFG_CAPTURE=0
CXXFLAGS-bin/herbceptionemulation:=-fno-exceptions
CXXFLAGS-bin/herbceptions:=-fno-exceptions
CXXFLAGS-bin/outcome:=-fno-exceptions
CXXFLAGS-bin/baseline:=-fno-exceptions
CXXFLAGS-bin/main_googlebench:=-Ithirdparty/benchmark/include
LDFLAGS-bin/runtests_googlebench:=-Lbin/benchmark/src -lbenchmark