mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[vcpkg] Reduce verbosity when building ports. Reduce cleaning requirements for packages\ directory.
This commit is contained in:
parent
a2b9325948
commit
b93fb28e7c
@ -51,7 +51,6 @@ function(vcpkg_apply_patches)
|
||||
message(STATUS "Applying patch failed. This is expected if this patch was previously applied.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Applying patch ${PATCH} done")
|
||||
math(EXPR PATCHNUM "${PATCHNUM}+1")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -74,7 +74,7 @@ function(vcpkg_build_cmake)
|
||||
set(CONFIG "Release")
|
||||
endif()
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}")
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}")
|
||||
set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}")
|
||||
set(LOGS)
|
||||
|
||||
@ -174,7 +174,6 @@ function(vcpkg_build_cmake)
|
||||
${STRINGIFIED_LOGS})
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} done")
|
||||
if(_bc_ADD_BIN_TO_PATH)
|
||||
set(ENV{PATH} "${_BACKUP_ENV_PATH}")
|
||||
endif()
|
||||
|
@ -33,7 +33,6 @@ function(vcpkg_build_qmake)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX}
|
||||
LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}
|
||||
)
|
||||
message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} done")
|
||||
endfunction()
|
||||
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
|
@ -122,6 +122,9 @@ function(vcpkg_configure_cmake)
|
||||
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_NAME)
|
||||
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
|
||||
endif()
|
||||
endif()
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
|
||||
@ -239,7 +242,6 @@ function(vcpkg_configure_cmake)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure
|
||||
LOGNAME config-${TARGET_TRIPLET}
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET} done")
|
||||
else()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
@ -249,7 +251,6 @@ function(vcpkg_configure_cmake)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME config-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
@ -260,7 +261,6 @@ function(vcpkg_configure_cmake)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME config-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -81,9 +81,8 @@ function(vcpkg_download_distfile VAR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Testing integrity of ${FILE_KIND}...")
|
||||
file(SHA512 ${FILE_PATH} FILE_HASH)
|
||||
if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}")
|
||||
if(NOT FILE_HASH STREQUAL vcpkg_download_distfile_SHA512)
|
||||
message(FATAL_ERROR
|
||||
"\nFile does not have expected hash:\n"
|
||||
" File path: [ ${FILE_PATH} ]\n"
|
||||
@ -91,10 +90,9 @@ function(vcpkg_download_distfile VAR)
|
||||
" Actual hash: [ ${FILE_HASH} ]\n"
|
||||
"${CUSTOM_ERROR_ADVICE}\n")
|
||||
endif()
|
||||
message(STATUS "Testing integrity of ${FILE_KIND}... OK")
|
||||
endfunction()
|
||||
|
||||
if(EXISTS ${downloaded_file_path})
|
||||
if(EXISTS "${downloaded_file_path}")
|
||||
message(STATUS "Using cached ${downloaded_file_path}")
|
||||
test_hash("${downloaded_file_path}" "cached file" "Please delete the file and retry if this file should be downloaded again.")
|
||||
else()
|
||||
@ -104,7 +102,7 @@ function(vcpkg_download_distfile VAR)
|
||||
|
||||
# Tries to download the file.
|
||||
list(GET vcpkg_download_distfile_URLS 0 SAMPLE_URL)
|
||||
if(${_VCPKG_DOWNLOAD_TOOL} MATCHES "ARIA2" AND NOT ${SAMPLE_URL} MATCHES "aria2")
|
||||
if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT SAMPLE_URL MATCHES "aria2")
|
||||
vcpkg_find_acquire_program("ARIA2")
|
||||
message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...")
|
||||
execute_process(
|
||||
@ -127,7 +125,6 @@ function(vcpkg_download_distfile VAR)
|
||||
)
|
||||
set(download_success 0)
|
||||
else()
|
||||
message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}... OK")
|
||||
file(REMOVE
|
||||
${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log
|
||||
${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log
|
||||
@ -144,7 +141,6 @@ function(vcpkg_download_distfile VAR)
|
||||
message(STATUS "Downloading ${url}... Failed. Status: ${download_status}")
|
||||
set(download_success 0)
|
||||
else()
|
||||
message(STATUS "Downloading ${url}... OK")
|
||||
set(download_success 1)
|
||||
break()
|
||||
endif()
|
||||
|
@ -53,7 +53,6 @@ function(vcpkg_extract_source_archive_ex)
|
||||
)
|
||||
file(WRITE ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted)
|
||||
endif()
|
||||
message(STATUS "Extracting done")
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_extract_source_archive ARCHIVE)
|
||||
|
@ -141,7 +141,7 @@ function(vcpkg_from_github)
|
||||
endif()
|
||||
|
||||
set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE)
|
||||
|
||||
message(STATUS "Using source at ${SOURCE_PATH}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -205,4 +205,5 @@ function(vcpkg_from_github)
|
||||
PATCHES ${_vdud_PATCHES}
|
||||
)
|
||||
set(${_vdud_OUT_SOURCE_PATH} "${TEMP_SOURCE_PATH}" PARENT_SCOPE)
|
||||
message(STATUS "Using source at ${TEMP_SOURCE_PATH}")
|
||||
endfunction()
|
||||
|
@ -10,7 +10,6 @@ function(vcpkg_install_meson)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME package-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
@ -18,6 +17,5 @@ function(vcpkg_install_meson)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME package-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
endfunction()
|
||||
|
@ -37,7 +37,7 @@ if(CMD MATCHES "^BUILD$")
|
||||
message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CURRENT_PORT_DIR)
|
||||
if(NOT DEFINED CURRENT_PORT_DIR)
|
||||
message(FATAL_ERROR "CURRENT_PORT_DIR was not defined")
|
||||
endif()
|
||||
set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR)
|
||||
@ -51,19 +51,18 @@ if(CMD MATCHES "^BUILD$")
|
||||
message(FATAL_ERROR "Port is missing control file: ${CURRENT_PORT_DIR}/CONTROL")
|
||||
endif()
|
||||
|
||||
message(STATUS "CURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}")
|
||||
message(STATUS "DOWNLOADS=${DOWNLOADS}")
|
||||
|
||||
message(STATUS "CURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR}")
|
||||
message(STATUS "CURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR}")
|
||||
message(STATUS "CURRENT_PORT_DIR=${CURRENT_PORT_DIR}")
|
||||
|
||||
unset(PACKAGES_DIR)
|
||||
unset(BUILDTREES_DIR)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR})
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR})
|
||||
message(FATAL_ERROR "Unable to remove directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.")
|
||||
file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*")
|
||||
if(FILES_IN_CURRENT_PACKAGES_DIR)
|
||||
file(REMOVE_RECURSE ${FILES_IN_CURRENT_PACKAGES_DIR})
|
||||
file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*")
|
||||
if(FILES_IN_CURRENT_PACKAGES_DIR)
|
||||
message(FATAL_ERROR "Unable to empty directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user