Skip to content

Commit d204be4

Browse files
Move CXXFLAGS under COVERAGE handle
1 parent f1d09c3 commit d204be4

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,21 @@ jobs:
2424
- name: Build tests with coverage
2525
run: |
2626
make clean
27-
make test COVERAGE=1 CXX=g++ CXXFLAGS="-O0 -g --coverage" LDFLAGS="--coverage"
27+
make test COVERAGE=1 CXX=g++
2828
2929
- name: Run tests
3030
run: ./bin/test_main
3131

3232
- name: Generate coverage (LCOV)
3333
run: |
34-
# Clean any stale traces first
35-
lcov --directory obj --directory bin --zerocounters
36-
# Capture with matching gcov tool and stable options
3734
lcov --capture \
3835
--directory obj \
3936
--directory bin \
4037
--gcov-tool gcov-13 \
4138
--ignore-errors empty \
4239
--output-file coverage.info
43-
# (optional) keep only your code
4440
lcov --remove coverage.info '/usr/*' '*/googletest/*' \
45-
--output-file coverage.info
41+
--output-file coverage.info
4642
4743
- name: Upload to Codecov
4844
uses: codecov/codecov-action@v4

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ ifeq (test,$(MAKECMDGOALS))
5454
SDIR += tests
5555
endif
5656

57+
# Set version to C++14
58+
CXXFLAGS = -std=c++14
59+
5760
# Enable coverage for "coverage" and "test" targets
5861
# --- Coverage toggle (OFF by default)
5962
COVERAGE ?= 0
@@ -141,7 +144,6 @@ INTEL = $(shell type icpc >/dev/null 2>&1; echo $$?)
141144
GCC = $(shell type g++ >/dev/null 2>&1; echo $$?)
142145

143146
INCS = $(shell gsl-config --cflags) -Iinclude -Iinclude/*
144-
CXXFLAGS += -std=c++14
145147
LIBS = $(shell gsl-config --libs)
146148

147149
# Add pthread to library if multithreading (embarrassingly parallel) is needed

0 commit comments

Comments
 (0)