mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
Turn off -Werror by default.
It inteferes with development activities by breaking your build in the middle of a refactor. Instead, let's enable -Werror on the Travis CI builds via a TRAVIS_CI_BUILD option.
This commit is contained in:
parent
79a96ec1a4
commit
a581173e71
@ -23,7 +23,15 @@ set(NEOVIM_VERSION_PATCH 0)
|
|||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
add_definitions(-Werror -Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99)
|
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99)
|
||||||
|
|
||||||
|
option(
|
||||||
|
TRAVIS_CI_BUILD "Travis CI build. Extra compilation flags will be set." OFF)
|
||||||
|
|
||||||
|
if(TRAVIS_CI_BUILD)
|
||||||
|
message(STATUS "Travis CI build enabled.")
|
||||||
|
add_definitions(-Werror)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(-DHAVE_CONFIG_H)
|
add_definitions(-DHAVE_CONFIG_H)
|
||||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
|
@ -121,7 +121,7 @@ if [ "$TRAVIS_BUILD_TYPE" = "clang/asan" ]; then
|
|||||||
export SKIP_UNITTEST=1
|
export SKIP_UNITTEST=1
|
||||||
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
|
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
|
||||||
|
|
||||||
$MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$install_dir -DUSE_GCOV=ON"
|
$MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DCMAKE_INSTALL_PREFIX=$install_dir -DUSE_GCOV=ON"
|
||||||
$MAKE_CMD
|
$MAKE_CMD
|
||||||
if ! $MAKE_CMD test; then
|
if ! $MAKE_CMD test; then
|
||||||
reset
|
reset
|
||||||
@ -136,7 +136,7 @@ elif [ "$TRAVIS_BUILD_TYPE" = "gcc/unittest" ]; then
|
|||||||
export CC=gcc
|
export CC=gcc
|
||||||
set_environment /opt/neovim-deps
|
set_environment /opt/neovim-deps
|
||||||
export SKIP_EXEC=1
|
export SKIP_EXEC=1
|
||||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP -DUSE_GCOV=ON" unittest
|
$MAKE_CMD CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=TAP -DUSE_GCOV=ON" unittest
|
||||||
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
||||||
elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then
|
elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then
|
||||||
set_environment /opt/neovim-deps/32
|
set_environment /opt/neovim-deps/32
|
||||||
@ -159,7 +159,7 @@ elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then
|
|||||||
# correctly.
|
# correctly.
|
||||||
sudo apt-get install libncurses5-dev:i386
|
sudo apt-get install libncurses5-dev:i386
|
||||||
|
|
||||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_TOOLCHAIN_FILE=cmake/i386-linux-gnu.toolchain.cmake" unittest
|
$MAKE_CMD CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_TOOLCHAIN_FILE=cmake/i386-linux-gnu.toolchain.cmake" unittest
|
||||||
$MAKE_CMD test
|
$MAKE_CMD test
|
||||||
elif [ "$TRAVIS_BUILD_TYPE" = "clint" ]; then
|
elif [ "$TRAVIS_BUILD_TYPE" = "clint" ]; then
|
||||||
./scripts/clint.sh
|
./scripts/clint.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user