Skip to content

Commit

Permalink
BLD: Only enable -Werror in the CI jobs (#38087)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Hawkins <[email protected]>
  • Loading branch information
xhochy and simonjayhawkins authored Nov 27, 2020
1 parent 19c5eea commit 003c4a7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ fi
echo "activate pandas-dev"
source activate pandas-dev

# Explicitly set an environment variable indicating that this is pandas' CI environment.
#
# This allows us to enable things like -Werror that shouldn't be activated in
# downstream CI jobs that may also build pandas from source.
export PANDAS_CI=1

echo
echo "remove any installed pandas package"
echo "w/o removing anything else"
Expand Down
8 changes: 8 additions & 0 deletions doc/source/whatsnew/v1.1.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ Bug fixes

.. ---------------------------------------------------------------------------
.. _whatsnew_115.other:

Other
~~~~~
- Only set ``-Werror`` as a compiler flag in the CI jobs (:issue:`33315`, :issue:`33314`)

.. ---------------------------------------------------------------------------
.. _whatsnew_115.contributors:

Contributors
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,16 @@ def run(self):
endian_macro = [("__LITTLE_ENDIAN__", "1")]


extra_compile_args = []
extra_link_args = []
if is_platform_windows():
extra_compile_args = []
extra_link_args = []
if debugging_symbols_requested:
extra_compile_args.append("/Z7")
extra_link_args.append("/DEBUG")
else:
extra_compile_args = ["-Werror"]
extra_link_args = []
# PANDAS_CI=1 is set by ci/setup_env.sh
if os.environ.get("PANDAS_CI", "0") == "1":
extra_compile_args.append("-Werror")
if debugging_symbols_requested:
extra_compile_args.append("-g")

Expand Down

0 comments on commit 003c4a7

Please sign in to comment.