Skip to content

Commit

Permalink
only treat compilation warnings as error in CI
Browse files Browse the repository at this point in the history
Easier to work with the project as developer and with older (and probably
newer) compilers.
  • Loading branch information
ursfassler committed May 9, 2024
1 parent e71c120 commit 3a21b99
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
- name: build
run: |
export CXXFLAGS=-Werror
cmake -E make_directory build
cmake -E chdir build cmake \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp-compiler }} \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qt5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: build
run: |
export CXXFLAGS=-Werror
cmake -E make_directory build
cmake -E chdir build cmake \
-G Ninja \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
- name: build and run
run: |
export CXXFLAGS=-Werror
./run-linux.sh
- name: code coverage summary report
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif()
#

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

0 comments on commit 3a21b99

Please sign in to comment.