2 CXXFLAGS ?= -O2 -g3 -ggdb -Wall -Wno-sign-compare
3 CXXFLAGS += --std=c++20
4 CXXFLAGS += -fsanitize=undefined -fsanitize=address
7 SRC = $(shell find -maxdepth 1 -name '*.cpp')
8 BIN = $(shell find -maxdepth 1 -name '*.cpp' | xargs basename -s .cpp)
18 @echo "\e[1;32mHappy path without exceptions:\e[0m"
19 @for bin in $(BIN); do ./$$bin ; done
21 @echo "\e[1;32mInterrupted by exceptions:\e[0m"
22 @for bin in $(BIN); do ./$$bin fail; done
25 $(CXX) $(CXXFLAGS) -o $(@) $(@).cpp $(LDFLAGS)
27 # Blok finally při odchytávání výjimek: C++ vs. Java
28 # https://blog.frantovo.cz/c/395/