mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 05:58:04 +08:00
[vcpkg_execute_*_process] Add support for build profiling (#22676)
Use --x-cmake-args=-DX_PORT_PROFILE=TRUE to enable port build profiling
This commit is contained in:
parent
d6541fff4b
commit
2e4c6df44c
@ -37,6 +37,13 @@ function(vcpkg_execute_build_process)
|
||||
set(log_err "${log_prefix}-err.log")
|
||||
set(all_logs "${log_out}" "${log_err}")
|
||||
|
||||
if(X_PORT_PROFILE)
|
||||
vcpkg_list(PREPEND arg_COMMAND "${CMAKE_COMMAND}" "-E" "time")
|
||||
if(DEFINED arg_NO_PARALLEL_COMMAND)
|
||||
vcpkg_list(PREPEND arg_NO_PARALLEL_COMMAND "${CMAKE_COMMAND}" "-E" "time")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${arg_COMMAND}
|
||||
WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}"
|
||||
|
@ -51,6 +51,10 @@ Halting portfile execution.
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(X_PORT_PROFILE AND NOT arg_ALLOW_IN_DOWNLOAD_MODE)
|
||||
vcpkg_list(PREPEND arg_COMMAND "${CMAKE_COMMAND}" "-E" "time")
|
||||
endif()
|
||||
|
||||
vcpkg_execute_in_download_mode(
|
||||
COMMAND ${arg_COMMAND}
|
||||
OUTPUT_FILE "${log_out}"
|
||||
|
@ -27,6 +27,10 @@ Halting portfile execution.
|
||||
]])
|
||||
endif()
|
||||
|
||||
if(X_PORT_PROFILE AND NOT arg_ALLOW_IN_DOWNLOAD_MODE)
|
||||
vcpkg_list(PREPEND arg_COMMAND "${CMAKE_COMMAND}" "-E" "time")
|
||||
endif()
|
||||
|
||||
set(all_logs "")
|
||||
foreach(loop_count RANGE 1 ${arg_COUNT})
|
||||
set(out_log "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out-${loop_count}.log")
|
||||
|
Loading…
x
Reference in New Issue
Block a user