diff --git a/src/cmake/__init__.py b/src/cmake/__init__.py index ef8257d6..925cac87 100644 --- a/src/cmake/__init__.py +++ b/src/cmake/__init__.py @@ -1,6 +1,7 @@ from __future__ import annotations import os +import shutil import subprocess import sys from importlib.metadata import distribution @@ -50,6 +51,11 @@ def _program_exit(name: str, *args: str) -> NoReturn: def ccmake() -> NoReturn: + if shutil.which("ccmake", path=CMAKE_BIN_DIR) is None: + raise FileNotFoundError( + f"'ccmake' is not available in cmake installation at '{CMAKE_BIN_DIR}'. " + "Perhaps 'ccmake' is not yet inclucded to the package for this platform." + ) _program_exit('ccmake', *sys.argv[1:])