Skip to content

Commit

Permalink
Fix setup.py not actually using environment variable value
Browse files Browse the repository at this point in the history
The CMake option QX_CPU_COMPATIBILITY_MODE is by default ON.
It was not possible to set it to OFF using environment variables.
  • Loading branch information
pablolh committed Dec 15, 2022
1 parent 7655e78 commit 8fae7d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ def run(self):
# C++ tests can be enabled using an environment variable. They'll
# be run before the install.
if 'QX_BUILD_TESTS' in os.environ:
cmd = cmd['-DQX_BUILD_TESTS=ON']
cmd = cmd['-DQX_BUILD_TESTS=' + os.environ['QX_BUILD_TESTS']]

# Enable CPU extension compatibility mode when requested.
if 'QX_CPU_COMPATIBILITY_MODE' in os.environ:
cmd = cmd['-DQX_CPU_COMPATIBILITY_MODE=ON']
cmd = cmd['-DQX_CPU_COMPATIBILITY_MODE=' + os.environ['QX_CPU_COMPATIBILITY_MODE']]

# Run cmake configuration.
cmd & FG
Expand Down

0 comments on commit 8fae7d3

Please sign in to comment.