diff options
| author | Sayed Adel <seiko@imavr.com> | 2023-04-24 11:24:03 +0200 |
|---|---|---|
| committer | Sayed Adel <seiko@imavr.com> | 2023-04-24 15:11:54 +0200 |
| commit | bcc9c51c167a7bfaa8475b146a5bebc03213687f (patch) | |
| tree | 96e8db9beac89414087e19644a90fedfc2f00651 /setup.py | |
| parent | 2a66cbb1d760d6072716edfef86a2ede4c770e2b (diff) | |
| download | numpy-bcc9c51c167a7bfaa8475b146a5bebc03213687f.tar.gz | |
BUG: Avoid uses -Werror during tests default C/C++ standards
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.
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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<T>); int main() { - if constexpr (test_fold<int, const int>) { + if (test_fold<int, const int>) { return 0; } else { |
