General Purpose library for Freestanding C++ and POSIX systems
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

25 linhas
1.1 KiB

há 3 anos
há 3 anos
há 3 anos
  1. CXX= clang++
  2. CXXFLAGS= --std=c++20 -O0 -g -pthread -DGP_TESTS -DFUZZ_STRENGTH=100 -DNO_BENCH=1 -pedantic \
  3. -fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes -fno-omit-frame-pointer \
  4. -DCATCH_EXCEPTIONS=1
  5. # -fsanitize=address -fsanitize-blacklist=blacklist.txt
  6. EVERY_USEFUL_FILE= $(shell find include/ -name "*.hpp" -type "f")
  7. EVERY_TEST_FILE= $(shell find tests/ -name "*.cpp" -type "f")
  8. all: tests
  9. docs: $(EVERY_USEFUL_FILE)
  10. doxygen doxy.config
  11. tests: bin/tests
  12. LLVM_PROFILE_FILE="./bin/tests.profraw" ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer ./bin/tests
  13. @llvm-profdata merge -sparse ./bin/tests.profraw -o ./bin/tests.profdata
  14. @llvm-cov report ./bin/tests -instr-profile=./bin/tests.profdata $(EVERY_USEFUL_FILE)
  15. @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'
  16. bin/tests: tests.cpp $(EVERY_TEST_FILE) $(EVERY_USEFUL_FILE) ./tests/test_scaffold.h
  17. @mkdir -p $(@D)
  18. $(CXX) $(CXXFLAGS) -Itests -Iinclude tests.cpp $(EVERY_TEST_FILE) -o $@
  19. clean: ./bin
  20. @rm -rf $<