Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only treat compilation warnings as error in CI #301

Merged
merged 1 commit into from
May 9, 2024
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
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
Loading