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:
parent
bf6abf3e6c
commit
211be143f1
2 changed files with 14 additions and 1 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue