CI: Enable compiler warnings in CI builds (#648)
'-Wall -Wunused -Wsuggest-override' depending on the C++ standard, either - C++98 (Linux/X11) - C++11 (Linux/Wayland) - C++20 (macOS)
This commit is contained in:
parent
cf2d2fc5e0
commit
5e133c1e88
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTION_USE_WAYLAND=OFF
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTION_USE_WAYLAND=OFF -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_C_FLAGS_INIT="-Wall -Wunused" -DCMAKE_CXX_FLAGS_INIT="-Wall -Wunused"
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
@ -66,7 +66,7 @@ jobs:
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_C_FLAGS_INIT="-Wall -Wunused" -DCMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override"
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
@ -97,7 +97,7 @@ jobs:
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_C_FLAGS_INIT="-Wall -Wunused" -DCMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override"
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
|
Loading…
Reference in New Issue
Block a user