File tree 2 files changed +13
-3
lines changed 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
"""Config command."""
6
6
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
9
9
10
10
11
11
def config (
12
12
_ ,
13
13
):
14
14
"""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
15
25
cmd = [
16
26
"--preset conan-default" ,
17
27
f"-DCMAKE_INSTALL_PREFIX={ str (INSTALL_DIR )} " ,
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def run_cmake(
73
73
** kwargs ,
74
74
)
75
75
if res .returncode :
76
- fail ("Error while executing cmake: \n %s \n %s" , res . stdout , res . stderr )
76
+ fail ("Error while executing cmake" )
77
77
return res
78
78
79
79
You can’t perform that action at this time.
0 commit comments