Skip to content

Commit

Permalink
build(error): treat warnings as errors by default
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Jun 27, 2023
1 parent 986ee92 commit 5eea20f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
run: |
cmake ${{ matrix.package }} \
-B ${{ matrix.package }}/build \
-D CMAKE_CXX_FLAGS=-Werror \
-D BUILD_TESTING=ON
- name: Check code formatting
Expand Down Expand Up @@ -58,7 +57,6 @@ jobs:
cmake ${{ matrix.package }} `
-B ${{ matrix.package }}/build `
-D CMAKE_CXX_COMPILER=cl `
-D CMAKE_CXX_FLAGS=/WX `
-D BUILD_TESTING=ON
- name: Build project
Expand Down
4 changes: 2 additions & 2 deletions error/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 3.0)
project(error)

if(MSVC)
set(WARNING_FLAGS /permissive- /W4 /w14640 /EHsc)
set(WARNING_FLAGS /WX /permissive- /W4 /w14640 /EHsc)
else()
set(WARNING_FLAGS -Wall -Wextra -Wnon-virtual-dtor -Wpedantic)
set(WARNING_FLAGS -Werror -Wall -Wextra -Wnon-virtual-dtor -Wpedantic)
endif()

include(cmake/CPM.cmake)
Expand Down

0 comments on commit 5eea20f

Please # to comment.