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 52f3eb0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
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
3 changes: 2 additions & 1 deletion .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 All @@ -60,7 +61,7 @@ jobs:
-DCUKE_ENABLE_EXAMPLES=on \
-DCUKE_TESTS_UNIT=on \
..
cmake --build build --parallel
cmake --build build --parallel --verbose
- name: unit tests
run: |
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
2 changes: 1 addition & 1 deletion run-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cmake -E chdir build cmake \
-DCUKE_TESTS_UNIT=on \
-DCUKE_CODE_COVERAGE=on \
..
cmake --build build --parallel
cmake --build build --parallel --verbose

#
# Run tests
Expand Down

0 comments on commit 52f3eb0

Please sign in to comment.