Skip to content

Commit

Permalink
Use global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort committed Jan 17, 2022
1 parent 29b1532 commit 4fff1e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions scripts/cmake/vcpkg_execute_build_process.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function(vcpkg_execute_build_process)
set(log_out "${log_prefix}-out.log")
set(log_err "${log_prefix}-err.log")
set(all_logs "${log_out}" "${log_err}")
set(log_collection "${CURRENT_BUILDTREES_DIR}/logs.txt")

execute_process(
COMMAND ${arg_COMMAND}
Expand Down Expand Up @@ -151,7 +150,7 @@ function(vcpkg_execute_build_process)
if(NOT log_size EQUAL "0")
file(TO_NATIVE_PATH "${log}" native_log)
string(APPEND stringified_logs " ${native_log}\n")
file(APPEND "${log_collection}" "error:${native_log}\n")
file(APPEND "${Z_VCPKG_LOG_COLLECTION_FILE}" "error:${native_log}\n")
endif()
endforeach()
z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND})
Expand Down
3 changes: 1 addition & 2 deletions scripts/cmake/vcpkg_execute_required_process.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ Halting portfile execution.

set(log_out "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-out.log")
set(log_err "${CURRENT_BUILDTREES_DIR}/${arg_LOGNAME}-err.log")
set(log_collection "${CURRENT_BUILDTREES_DIR}/logs.txt")

set(timeout_param "")
set(output_and_error_same OFF)
Expand Down Expand Up @@ -121,7 +120,7 @@ Halting portfile execution.
if(NOT log_size EQUAL "0")
file(TO_NATIVE_PATH "${log}" native_log)
string(APPEND stringified_logs " ${native_log}\n")
file(APPEND "${log_collection}" "error:${native_log}\n")
file(APPEND "${Z_VCPKG_LOG_COLLECTION_FILE}" "error:${native_log}\n")
endif()
endforeach()

Expand Down
3 changes: 3 additions & 0 deletions scripts/ports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ if(CMD MATCHES "^BUILD$")
set(TRIPLET_SYSTEM_ARCH "${VCPKG_TARGET_ARCHITECTURE}")
include("${SCRIPTS}/cmake/vcpkg_common_definitions.cmake")

set(Z_VCPKG_LOG_COLLECTION_FILE "${CURRENT_BUILDTREES_DIR}/logs.txt")
file(REMOVE "${Z_VCPKG_LOG_COLLECTION_FILE}")

include("${CURRENT_PORT_DIR}/portfile.cmake")
if(DEFINED PORT)
include("${SCRIPTS}/build_info.cmake")
Expand Down

0 comments on commit 4fff1e9

Please sign in to comment.