From 428b7b9b1829dd1e03d555c8d8b86af806dba10a Mon Sep 17 00:00:00 2001 From: seleznevae Date: Fri, 24 May 2019 05:51:13 +0300 Subject: [PATCH] [D] Deleted `-Werror` flag from default flgs for gcc and clang --- .cirrus.yml | 9 ++++++--- .travis.yml | 11 +++++++---- CMakeLists.txt | 1 - 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index fff3a98..d1b627a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,6 +3,9 @@ freebsd_instance: main_task: script: + - CMAKE_C_FLAGS="-Werror" + - CMAKE_CXX_FLAGS="-Werror" + - uname -a - ls - yes | pkg install cmake @@ -27,7 +30,7 @@ main_task: # Test build without optimizations and with asan - mkdir -p build - cd build - - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 + - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" - cmake --build . --target all - ls - ctest -VV @@ -37,7 +40,7 @@ main_task: # Test build without optimizations and with ubsan - mkdir -p build - cd build - - cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 + - cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" - cmake --build . --target all - ls - ctest -VV @@ -47,7 +50,7 @@ main_task: # Test without WCHAR support - mkdir -p build - cd build - - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 + - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" - cmake --build . --target all - ls - ctest -VV diff --git a/.travis.yml b/.travis.yml index 6ef2ac1..9f2f912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,6 +119,9 @@ matrix: script: + - CMAKE_C_FLAGS="-Werror" + - CMAKE_CXX_FLAGS="-Werror" + # Check library file was generated - python amalgamate.py -o dummy.c - wc dummy.c @@ -191,7 +194,7 @@ script: # Test build without optimizations and with asan - mkdir -p build - cd build - - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 + - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" - cmake --build . --target all - ls - ctest -VV @@ -201,7 +204,7 @@ script: - rm -r build/* - mkdir -p build - cd build - - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 + - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" - cmake --build . --target all - ls - ctest -VV @@ -212,7 +215,7 @@ script: cd .. ; rm -r build/* ; cd build ; - cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 ; + cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" ; cmake --build . --target all ; ls ; ctest -VV; @@ -258,7 +261,7 @@ script: cd .. ; rm -r build/* ; cd build ; - cmake .. -DFORT_BUILD_TYPE=coveralls -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 ; + cmake .. -DFORT_BUILD_TYPE=coveralls -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" ; cmake --build . --target all ; ls ; ./tests/libfort_test_dev ; diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c3d46f..80c5e28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ else() set(ADDITIONAL_WARNINGS "\ -Wall \ -Wextra \ - -Werror \ -Wdouble-promotion \ -Wshadow \ -Wformat=2 \