Skip to content

Commit

Permalink
[PACKAGE] fix: make function really use the default value (#18486)
Browse files Browse the repository at this point in the history
I was wondering why the MacOs nightly packages where failing. Seems like
this was the issue.
  • Loading branch information
maxbartel authored Sep 12, 2024
1 parent 861695b commit c7351e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compiler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ def maybe_nuke_cmake_cache():
f.write(expected_stamp_contents)


def get_env_cmake_option(name: str, default_value: bool = False) -> str:
def get_env_cmake_option(name: str, default_value: str = "OFF") -> str:
svalue = os.getenv(name)
if not svalue:
svalue = "ON" if default_value else "OFF"
svalue = default_value
return f"-D{name}={svalue}"


Expand Down
4 changes: 2 additions & 2 deletions runtime/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def maybe_nuke_cmake_cache(cmake_build_dir, cmake_install_dir):
f.write(expected_stamp_contents)


def get_env_cmake_option(name: str, default_value: bool = False) -> str:
def get_env_cmake_option(name: str, default_value: str = "OFF") -> str:
svalue = os.getenv(name)
if not svalue:
svalue = "ON" if default_value else "OFF"
svalue = default_value
return f"-D{name}={svalue}"


Expand Down

0 comments on commit c7351e1

Please sign in to comment.