Skip to content

Commit

Permalink
check for ninja to determine default CMake generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwilke committed Sep 22, 2022
1 parent 5b85d55 commit 1017282
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ def validate_path(path):


def driver():
ninja_path = shutil.which("ninja")
if ninja_path is None:
cmake_generator_default = None
else:
cmake_generator_default = "Ninja"

parser = argparse.ArgumentParser(description="Install cuNumeric.")
parser.add_argument(
"--install-dir",
Expand Down Expand Up @@ -513,8 +519,8 @@ def driver():
"--cmake-generator",
dest="cmake_generator",
required=False,
default="Ninja",
choices=["Ninja", "Unix Makefiles"],
default=cmake_generator_default,
choices=["Ninja", "Unix Makefiles", None],
help="The CMake makefiles generator",
)
parser.add_argument(
Expand Down

0 comments on commit 1017282

Please sign in to comment.