1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

chore: Try to turn on Werror in the CI (#1261)

This commit is contained in:
Roy Jacobson 2023-05-22 05:21:01 +03:00 committed by GitHub
parent bf6abf3e6c
commit 211be143f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -68,7 +68,12 @@ jobs:
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -L
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
-GNinja \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-Werror" \
-L
cd ${{github.workspace}}/build && pwd
du -hcs _deps/
- name: Build & Test

View file

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
set(PROJECT_CONTACT romange@gmail.com)
include(CheckCXXCompilerFlag)
enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
@ -10,6 +12,12 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
project(DRAGONFLY C CXX)
set(CMAKE_CXX_STANDARD 17)
# Disabled because it has false positives with ref-counted intrusive pointers.
CHECK_CXX_COMPILER_FLAG("-Wuse-after-free" HAS_USE_AFTER_FREE_WARN)
if (HAS_USE_AFTER_FREE_WARN)
set(CMAKE_CXX_FLAGS "-Wno-use-after-free ${CMAKE_CXX_FLAGS}")
endif()
# We must define all the required variables from the root cmakefile, otherwise
# they just disappear.
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/helio/cmake" ${CMAKE_MODULE_PATH})