General Purpose library for Freestanding C++ and POSIX systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.1 KiB

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