-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: separate installing and building (again)
- Loading branch information
1 parent
14c173b
commit 1013212
Showing
2 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
set(ZIG_INSTALL_ARGS ${ZIG_BUILD_ARGS} --prefix "${CMAKE_INSTALL_PREFIX}") | ||
execute_process(COMMAND "${ZIG_EXECUTABLE}" ${ZIG_INSTALL_ARGS} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE _result) | ||
|
||
if(_result) | ||
message("::") | ||
message(":: ERROR: ${_result}") | ||
message(":: (execute_process)") | ||
|
||
list(JOIN ZIG_INSTALL_ARGS " " s_INSTALL_LIBSTAGE2_ARGS) | ||
message("::") | ||
message(":: argv: ${ZIG_EXECUTABLE} ${s_INSTALL_LIBSTAGE2_ARGS}") | ||
|
||
set(_args ${ZIG_EXECUTABLE} ${ZIG_INSTALL_ARGS}) | ||
list(LENGTH _args _len) | ||
math(EXPR _len "${_len} - 1") | ||
message("::") | ||
foreach(_i RANGE 0 ${_len}) | ||
list(GET _args ${_i} _arg) | ||
message(":: argv[${_i}]: ${_arg}") | ||
endforeach() | ||
|
||
message("::") | ||
message(FATAL_ERROR) | ||
endif() |