Add BUILD_WERROR option
Adds a cmake BUILD_WERROR option to enable warnings as errors. This option is off by default. This change also cleans up a few more compiler warnings.
This commit is contained in:
parent
719b6b7deb
commit
3f615ad93e
6 changed files with 22 additions and 12 deletions
6
.github/workflows/continuous_integration.yml
vendored
6
.github/workflows/continuous_integration.yml
vendored
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}
|
||||
- run: ./update_glslang_sources.py
|
||||
- name: Configure
|
||||
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
|
||||
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON
|
||||
env:
|
||||
CC: ${{matrix.compiler.cc}}
|
||||
CXX: ${{matrix.compiler.cxx}}
|
||||
|
|
@ -126,7 +126,7 @@ jobs:
|
|||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7
|
||||
- run: ./update_glslang_sources.py
|
||||
- run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja
|
||||
- run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON
|
||||
env:
|
||||
CC: ${{matrix.compiler.cc}}
|
||||
CXX: ${{matrix.compiler.cxx}}
|
||||
|
|
@ -155,7 +155,7 @@ jobs:
|
|||
- run: python update_glslang_sources.py
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install"
|
||||
cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON
|
||||
cmake --build build --config ${{matrix.cmake_build_type}} --target install
|
||||
- name: Test
|
||||
run: ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue