diff options
| author | Sander Cox <sander@resolume.com> | 2020-10-20 04:52:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-19 19:52:36 -0700 |
| commit | e93810d2ef7633e374992006af89f2b5056b04f1 (patch) | |
| tree | ffd5c10730257d7dba6af1a819cfc4e8c4eeae89 /scripts | |
| parent | 334aec69e408d1ea52b7af125eda0a2066424922 (diff) | |
| download | vcpkg-e93810d2ef7633e374992006af89f2b5056b04f1.tar.gz vcpkg-e93810d2ef7633e374992006af89f2b5056b04f1.zip | |
[CMake] VCPKG_APPLOCAL_DEPS sometimes causes conflicts when processing multiple files in the same directory (#13025)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 00e6645fa..7e6d5408a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -394,6 +394,7 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT _CMAKE_IN_TRY_COMPILE) endif() option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +option(X_VCPKG_APPLOCAL_DEPS_SERIALIZED "(experimental) Add USES_TERMINAL to VCPKG_APPLOCAL_DEPS to force serialization." OFF) function(add_executable name) _add_executable(${ARGV}) list(FIND ARGV "IMPORTED" IMPORTED_IDX) @@ -402,11 +403,16 @@ function(add_executable name) if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) if(VCPKG_APPLOCAL_DEPS) if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") + set(EXTRA_OPTIONS "") + if(X_VCPKG_APPLOCAL_DEPS_SERIALIZED) + set(EXTRA_OPTIONS USES_TERMINAL) + endif() add_custom_command(TARGET ${name} POST_BUILD COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 -targetBinary $<TARGET_FILE:${name}> -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin" -OutVariable out + ${EXTRA_OPTIONS} ) elseif(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx") if (NOT MACOSX_BUNDLE_IDX EQUAL -1) |
