瀏覽代碼

Makefile edits

channel
Ludovic 'Archivist' Lagouardette 3 年之前
父節點
當前提交
dfe58fc8e3
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. +5
    -3
      Makefile

+ 5
- 3
Makefile 查看文件

@ -2,16 +2,18 @@ CXX= clang++
CXXFLAGS= --std=c++2a -O0 -g -pthread -DGP_TESTS -DFUZZ_STRENGTH=100000 -DNO_BENCH=0 -pedantic \
-fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes -fno-omit-frame-pointer \
EVERY_USEFUL_FILE= $(shell find include/ -name "*.hpp" -type "f")
EVERY_TEST_FILE= $(shell find tests/ -name "*.cpp" -type "f")
# -fsanitize=address -fsanitize-blacklist=blacklist.txt
all: tests
tests: bin/tests
LLVM_PROFILE_FILE="./bin/tests.profraw" ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer ./bin/tests
@llvm-profdata merge -sparse ./bin/tests.profraw -o ./bin/tests.profdata
@llvm-cov report ./bin/tests -instr-profile=./bin/tests.profdata $(wildcard include/*.hpp)
@llvm-cov report ./bin/tests -instr-profile=./bin/tests.profdata $(wildcard include/*.hpp) | tail -n 1 | tr -s " " | sed -e 's/ /,/g' -- | awk -F "," '{print $$9}' | sed -e 's/^/Untested lines: /g'
@llvm-cov report ./bin/tests -instr-profile=./bin/tests.profdata $(EVERY_USEFUL_FILE)
@llvm-cov report ./bin/tests -instr-profile=./bin/tests.profdata $(EVERY_USEFUL_FILE) | tail -n 1 | tr -s " " | sed -e 's/ /,/g' -- | awk -F "," '{print $$9}' | sed -e 's/^/Untested lines: /g'
bin/tests: tests.cpp $(wildcard tests/*.cpp) $(wildcard include/*.hpp) ./tests/test_scaffold.h
bin/tests: tests.cpp $(EVERY_TEST_FILE) $(EVERY_USEFUL_FILE) ./tests/test_scaffold.h
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -Itests -Iinclude tests.cpp -o $@

Loading…
取消
儲存