summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2023-04-24 11:24:03 +0200
committerSayed Adel <seiko@imavr.com>2023-04-24 15:11:54 +0200
commitbcc9c51c167a7bfaa8475b146a5bebc03213687f (patch)
tree96e8db9beac89414087e19644a90fedfc2f00651 /setup.py
parent2a66cbb1d760d6072716edfef86a2ede4c770e2b (diff)
downloadnumpy-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-xsetup.py5
1 files changed, 1 insertions, 4 deletions
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<T>);
int main()
{
- if constexpr (test_fold<int, const int>) {
+ if (test_fold<int, const int>) {
return 0;
}
else {