[vcpkg/cmake] add LOGNAME option (#14002)

Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
This commit is contained in:
Alexander Neumann 2020-10-15 20:01:00 +02:00 committed by GitHub
parent bfe983d721
commit f919a1bf2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,9 @@
## ### OPTIONS_DEBUG
## Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`.
##
## ### LOGNAME
## Name of the log to write the output of the configure call to.
##
## ## Notes
## This command supplies many common arguments to CMake. To see the full list, examine the source.
##
@ -64,7 +67,7 @@ function(vcpkg_configure_cmake)
# parse parameters such that semicolons in arguments to OPTIONS don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _csc
"PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG"
"SOURCE_PATH;GENERATOR"
"SOURCE_PATH;GENERATOR;LOGNAME"
"OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE"
)
@ -73,6 +76,10 @@ function(vcpkg_configure_cmake)
"however, vcpkg.exe must be rebuilt by re-running bootstrap-vcpkg.bat\n")
endif()
if(NOT _csc_LOGNAME)
set(_csc_LOGNAME config-${TARGET_TRIPLET})
endif()
if(CMAKE_HOST_WIN32)
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432})
@ -305,7 +312,7 @@ function(vcpkg_configure_cmake)
vcpkg_execute_required_process(
COMMAND ninja -v
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure
LOGNAME config-${TARGET_TRIPLET}
LOGNAME ${_csc_LOGNAME}
)
else()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
@ -314,7 +321,7 @@ function(vcpkg_configure_cmake)
vcpkg_execute_required_process(
COMMAND ${dbg_command}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME config-${TARGET_TRIPLET}-dbg
LOGNAME ${_csc_LOGNAME}-dbg
)
endif()
@ -324,7 +331,7 @@ function(vcpkg_configure_cmake)
vcpkg_execute_required_process(
COMMAND ${rel_command}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME config-${TARGET_TRIPLET}-rel
LOGNAME ${_csc_LOGNAME}-rel
)
endif()
endif()