Skip to content

Commit 52f3eb0

Browse files
committed
only treat compilation warnings as error in CI
Easier to work with the project as developer and with older (and probably newer) compilers.
1 parent e71c120 commit 52f3eb0

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

.github/workflows/linux-build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
5858
- name: build
5959
run: |
60+
export CXXFLAGS=-Werror
6061
cmake -E make_directory build
6162
cmake -E chdir build cmake \
6263
-DCMAKE_CXX_COMPILER=${{ matrix.cpp-compiler }} \

.github/workflows/qt5.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
5252
- name: build
5353
run: |
54+
export CXXFLAGS=-Werror
5455
cmake -E make_directory build
5556
cmake -E chdir build cmake \
5657
-G Ninja \
@@ -60,7 +61,7 @@ jobs:
6061
-DCUKE_ENABLE_EXAMPLES=on \
6162
-DCUKE_TESTS_UNIT=on \
6263
..
63-
cmake --build build --parallel
64+
cmake --build build --parallel --verbose
6465
6566
- name: unit tests
6667
run: |

.github/workflows/run-all.yml

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
5757
- name: build and run
5858
run: |
59+
export CXXFLAGS=-Werror
5960
./run-linux.sh
6061
6162
- name: code coverage summary report

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ endif()
9898
#
9999

100100
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
101-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Werror -Wall -Wextra -Wsuggest-override ${CMAKE_CXX_FLAGS}")
101+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -Wextra -Wsuggest-override ${CMAKE_CXX_FLAGS}")
102102
# TODO: A better fix should handle ld's --as-needed flag
103103
if(UNIX AND NOT APPLE)
104104
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker '--no-as-needed'")

run-linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cmake -E chdir build cmake \
1515
-DCUKE_TESTS_UNIT=on \
1616
-DCUKE_CODE_COVERAGE=on \
1717
..
18-
cmake --build build --parallel
18+
cmake --build build --parallel --verbose
1919

2020
#
2121
# Run tests

0 commit comments

Comments
 (0)