Skip to content

Commit 524fd70

Browse files
sbryngelsonCopilot
andauthored
Update toolchain/mfc/build.py
Co-authored-by: Copilot <[email protected]>
1 parent 4952826 commit 524fd70

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

toolchain/mfc/build.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ def __hash__(self) -> int:
3939
def get_compiler_info(self) -> str:
4040
compiler = "unknown"
4141
with tempfile.TemporaryDirectory() as build_dir:
42-
subprocess.run(
43-
["cmake", "-B", build_dir, "-S", ".", "-DCMAKE_VERBOSE_MAKEFILE=ON"],
44-
check=True,
45-
stdout=subprocess.DEVNULL,
46-
stderr=subprocess.DEVNULL,
47-
)
42+
try:
43+
subprocess.run(
44+
["cmake", "-B", build_dir, "-S", ".", "-DCMAKE_VERBOSE_MAKEFILE=ON"],
45+
check=True,
46+
stdout=subprocess.DEVNULL,
47+
stderr=subprocess.DEVNULL,
48+
)
49+
except (subprocess.CalledProcessError, FileNotFoundError):
50+
return "unknown"
4851

4952
cache = pathlib.Path(build_dir) / "CMakeCache.txt"
5053
if not cache.exists():

0 commit comments

Comments
 (0)