Skip to content

Commit ee6715c

Browse files
committed
Build: check 'make deps' before 'make'
1 parent 8aac631 commit ee6715c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

build-system/luxmake/config.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44

55
"""Config command."""
66

7-
from .constants import INSTALL_DIR, SOURCE_DIR
8-
from .utils import run_cmake
7+
from .constants import INSTALL_DIR, SOURCE_DIR, BINARY_DIR
8+
from .utils import run_cmake, fail
99

1010

1111
def config(
1212
_,
1313
):
1414
"""CMake config."""
15+
# Check whether presets exist
16+
presets = BINARY_DIR / "build" / "generators" / "CMakePresets.json"
17+
if not presets.exists():
18+
fail(
19+
"Cannot find presets file ('%s'). "
20+
"Have you run 'make deps' beforehand?",
21+
str(presets.absolute()),
22+
)
23+
24+
# Run command
1525
cmd = [
1626
"--preset conan-default",
1727
f"-DCMAKE_INSTALL_PREFIX={str(INSTALL_DIR)}",

build-system/luxmake/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def run_cmake(
7373
**kwargs,
7474
)
7575
if res.returncode:
76-
fail("Error while executing cmake:\n%s\n%s", res.stdout, res.stderr)
76+
fail("Error while executing cmake")
7777
return res
7878

7979

0 commit comments

Comments
 (0)