2024-05-14 16:00:17 +01:00
|
|
|
set(ZIG_INSTALL_ARGS build --prefix "${CMAKE_INSTALL_PREFIX}" ${ZIG_BUILD_ARGS})
|
2022-10-16 20:46:39 +01:00
|
|
|
execute_process(
|
|
|
|
COMMAND "${ZIG_EXECUTABLE}" ${ZIG_INSTALL_ARGS}
|
2024-05-15 10:03:48 +01:00
|
|
|
WORKING_DIRECTORY "${ZIG2_WORKING_DIR}"
|
2022-10-16 20:46:39 +01:00
|
|
|
RESULT_VARIABLE _result)
|
2022-10-01 17:58:09 +01:00
|
|
|
|
|
|
|
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()
|