Skip to content

Commit a3dfd44

Browse files
committed
a
1 parent 0a63bbd commit a3dfd44

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/test_installation.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,17 @@ def install_umf(self) -> None:
180180
sys.exit(
181181
f"Error: Installation directory '{self.install_dir}' is not empty"
182182
)
183-
183+
184184
install_cmd = f"cmake --build {self.build_dir} --config {self.build_type.title()} --target install"
185-
185+
186+
cmake_cache_file = self.build_dir / "CMakeCache.txt"
187+
if cmake_cache_file.exists():
188+
with cmake_cache_file.open() as f:
189+
for line in f:
190+
if "CMAKE_GENERATOR:INTERNAL=Ninja" in line:
191+
install_cmd = f"cmake --build {self.build_dir} --config {self.build_type.title()} --install"
192+
break
193+
186194
try:
187195
print(f"Running command: {install_cmd}", flush=True)
188196
subprocess.run(install_cmd.split()).check_returncode() # nosec B603

0 commit comments

Comments
 (0)