diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 368709b6..5e88a077 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,11 @@ repos: hooks: - id: cppcheck name: cppcheck - entry: make check + entry: | + bash -c ' + cmake --preset linux-test + cmake --build --preset linux-test --target check + ' language: system pass_filenames: false always_run: true @@ -17,7 +21,13 @@ repos: hooks: - id: unit-test name: unit-test - entry: make test + entry: | + bash -c ' + cmake --preset linux-test -DBUILD_SHARED_LIBS=on + cmake --build --preset linux-test --target sear + cmake --build --preset linux-test --target test_runner + ./build/linux/test_runner + ' language: system pass_filenames: false always_run: true diff --git a/Makefile b/Makefile index 09e44517..e858dbb4 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ TESTS = ${PWD}/tests ZOSLIB = $(TESTS)/zoslib CSTANDARD = c99 -CXXSTANDARD = c++14 +CXXSTANDARD = c++17 COMMON_INC = \ -I $(SRC) \ @@ -28,8 +28,8 @@ COMMON_INC = \ -I $(KEY_MAP) \ -I $(VALIDATION) \ -I $(JSON) \ - -I $(JSON_SCHEMA) - -I $(ICONV) \ + -I $(JSON_SCHEMA) \ + -I $(ICONV) # JSON Schemas SEAR_SCHEMA = $(shell cat ${PWD}/schema.json | jq -c) @@ -68,7 +68,7 @@ else ifeq ($(UNAME), Darwin) CC = clang CXX = clang++ - SRCZOSLIB = $(ZOSLIB)/*.c + SRCZOSLIB = $(ZOSLIB)/*.cpp CFLAGS = \ -std=$(CXXSTANDARD) -D__ptr32= \ @@ -88,7 +88,7 @@ else CC = clang CXX = clang++ - SRCZOSLIB = $(ZOSLIB)/*.c + SRCZOSLIB = $(ZOSLIB)/*.cpp CFLAGS = \ -std=$(CXXSTANDARD) -D__ptr32= \