Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TESTS = ${PWD}/tests
ZOSLIB = $(TESTS)/zoslib

CSTANDARD = c99
CXXSTANDARD = c++14
CXXSTANDARD = c++17

COMMON_INC = \
-I $(SRC) \
Expand All @@ -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)
Expand Down Expand Up @@ -68,7 +68,7 @@ else ifeq ($(UNAME), Darwin)
CC = clang
CXX = clang++

SRCZOSLIB = $(ZOSLIB)/*.c
SRCZOSLIB = $(ZOSLIB)/*.cpp

CFLAGS = \
-std=$(CXXSTANDARD) -D__ptr32= \
Expand All @@ -88,7 +88,7 @@ else
CC = clang
CXX = clang++

SRCZOSLIB = $(ZOSLIB)/*.c
SRCZOSLIB = $(ZOSLIB)/*.cpp

CFLAGS = \
-std=$(CXXSTANDARD) -D__ptr32= \
Expand Down