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

Permit to enable -Werror on builds, and enable by default for github actions. #165

Merged
merged 1 commit into from
Jan 16, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/build-for-bookworm-wlroots-018.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
export PKG_CONFIG_PATH="${{ env.INSTALL_PKGCONFIG_PATH }}"
export LD_LIBRARY_PATH="${{ env.INSTALL_LIBRARY_PATH }}"
export PATH="${PATH}:${{ env.INSTALL_PATH }}/bin"
cmake -DCMAKE_INSTALL_PREFIX:PATH=${{ env.INSTALL_PATH }} -B build/
cmake -DCMAKE_INSTALL_PREFIX:PATH=${{ env.INSTALL_PATH }} -Dconfig_WERROR=ON -B build/

- name: Build wlmaker.
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-for-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Configure wlmaker through CMake.
run: |
export CC="${{ matrix.compiler }}"
cmake -B build/
cmake -B build/ -Dconfig_WERROR=ON

- name: Build wlmaker.
run: |
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#
# Default arguments:
# cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -Dconfig_DOXYGEN_CRITICAL=ON -B build
# cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -Dconfig_DOXYGEN_CRITICAL=ON -Dconfig_WERROR=ON -B build
# CC=clang cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -Dconfig_DOXYGEN_CRITICAL=ON -B build-clang

CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
Expand Down Expand Up @@ -69,10 +69,14 @@ ENDIF(NOT WLROOTS_FOUND)
OPTION(config_DEBUG "Include debugging information" ON)
OPTION(config_OPTIM "Optimizations" OFF)
OPTION(config_DOXYGEN_CRITICAL "Whether to fail on doxygen warnings" OFF)
OPTION(config_WERROR "Make all compiler warnings into errors." OFF)

# Toplevel compile options, for GCC and clang.
IF(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
ADD_COMPILE_OPTIONS(-Wall -Wextra)
IF(config_WERROR)
ADD_COMPILE_OPTIONS(-Werror)
ENDIF(config_WERROR)

IF(config_DEBUG)
ADD_COMPILE_OPTIONS(-ggdb -DDEBUG)
Expand Down
2 changes: 1 addition & 1 deletion submodules/libbase
Loading