|
|
@@ -8,6 +8,7 @@ endif
|
|
|
|
|
|
CXX := clang++
|
|
|
CXX_FLAGS := -Wall -Wextra -Werror -std=c++20 -isystem include/ -DJVALIDATE_USE_EXCEPTIONS
|
|
|
+LD_FLAGS := -L/opt/local/lib
|
|
|
|
|
|
TEST_DIR := tests/
|
|
|
INCLUDE_DIR := include/
|
|
|
@@ -21,8 +22,9 @@ TEST_BINARIES := .build/bin/selfvalidate
|
|
|
|
|
|
all: run-test
|
|
|
|
|
|
-debug: CXX_FLAGS := $(CXX_FLAGS) -g
|
|
|
-debug: all
|
|
|
+debug: CXX_FLAGS := $(CXX_FLAGS) -g -fsanitize=address
|
|
|
+debug: LD_FLAGS := $(LD_FLAGS) -fsanitize=address
|
|
|
+debug: test
|
|
|
|
|
|
clean:
|
|
|
@ rm -rf .build
|
|
|
@@ -31,7 +33,7 @@ test: $(TEST_BINARIES)
|
|
|
|
|
|
run-test: test
|
|
|
run-test:
|
|
|
- .build/bin/selfvalidate --gtest_filter=-*date:*json_pointer:*idn_hostname:*uri:*uri_template:*iri_reference:*iri:*ipv4:*uri_reference:*time:*ipv6:*hostname:*email:*relative_json_pointer:*date_time:*idn_email $(CLEAN_ANSI)
|
|
|
+ .build/bin/selfvalidate --gtest_filter=-*date:*json_pointer:*idn_hostname:*uri:*uri_template:*iri_reference:*iri:*ipv4:*uri_reference:*time:*ipv6:*hostname:*email:*relative_json_pointer:*date_time:*idn_email:*content:*bignum $(CLEAN_ANSI)
|
|
|
|
|
|
.build/tests/%.o: tests/%.cxx $(HEADERS) $(TEST_HEADERS)
|
|
|
@ mkdir -p .build/tests
|
|
|
@@ -40,4 +42,4 @@ run-test:
|
|
|
|
|
|
.build/bin/selfvalidate: .build/tests/selfvalidate_test.o
|
|
|
@ mkdir -p .build/bin
|
|
|
- $(CXX) $< -o $@ -L/opt/local/lib -ljsoncpp -lgmock -lcurl -lgtest
|
|
|
+ $(CXX) $< -o $@ $(LD_FLAGS) -ljsoncpp -lgmock -lcurl -lgtest
|