From bcc9c51c167a7bfaa8475b146a5bebc03213687f Mon Sep 17 00:00:00 2001 From: Sayed Adel Date: Mon, 24 Apr 2023 11:24:03 +0200 Subject: BUG: Avoid uses -Werror during tests default C/C++ standards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This may break the test if any unsupported compiler options are specified. This patch also removes the testing of constexpr and keeps only fold expressions and inline variables to avoid triggering the constexpr warning warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17 by Travis CI, which can cause the build to fail due to warning trapping. --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index d06677ae1..fc16971c9 100755 --- a/setup.py +++ b/setup.py @@ -193,9 +193,6 @@ def get_build_overrides(): from numpy._utils import _pep440 def try_compile(compiler, file, flags = [], verbose=False): - # To bypass trapping warnings by Travis CI - if getattr(compiler, 'compiler_type', '') == 'unix': - flags = ['-Werror'] + flags bk_ver = getattr(compiler, 'verbose', False) compiler.verbose = verbose try: @@ -270,7 +267,7 @@ def get_build_overrides(): constexpr bool test_fold = (... && std::is_const_v); int main() { - if constexpr (test_fold) { + if (test_fold) { return 0; } else { -- cgit v1.2.1