From 126812d18bf244b9141d466ca27582df176a2038 Mon Sep 17 00:00:00 2001 From: crusader-mike Date: Mon, 22 Jul 2019 12:47:57 -0500 Subject: Resolves "project is never up-to-date" problem (issue 6179) (#7322) --- scripts/buildsystems/msbuild/applocal.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/buildsystems') diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 2fdd9fdb4..ab51dc9be 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -29,7 +29,7 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir } if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 } - if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" } + if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode } } -- cgit v1.2.3 From 0f3b6fc1638c3c0bf33a560d1ab89215b7af02fd Mon Sep 17 00:00:00 2001 From: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Date: Mon, 12 Aug 2019 14:41:53 -0700 Subject: vs 2019 integration bug (#7623) --- scripts/buildsystems/vcpkg.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'scripts/buildsystems') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index f657e2710..6eb0f62dd 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -38,17 +38,7 @@ else() elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 16 2019$") - if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Xx]86$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Mm][Dd]64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Rr][Mm]$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^[Aa][Rr][Mm]64$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm64) - else() - - endif() + set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() find_program(_VCPKG_CL cl) if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") -- cgit v1.2.3 From c7542de3f31defef6344e9acb05adf7d39f6d4a8 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 23 Sep 2019 13:43:52 -0700 Subject: Use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to propogate values (#5180) CMAKE_TRY_COMPILE_PLATFORM_VARIABLES is used when CMake 3.6.0 or higher is encountered. For older versions the previous behavior emulating this functionality is used. --- scripts/buildsystems/vcpkg.cmake | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'scripts/buildsystems') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 6eb0f62dd..ed9bcbc69 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,10 +1,17 @@ # Mark variables as used so cmake doesn't complain about them mark_as_advanced(CMAKE_TOOLCHAIN_FILE) -# This is a backport of CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to cmake 3.0 -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if( _CMAKE_IN_TRY_COMPILE ) - include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +# Determine whether the toolchain is loaded during a try-compile configuration +get_property(_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) + +if (${CMAKE_VERSION} VERSION_LESS "3.6.0") + set(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES ON) +else() + set(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES OFF) +endif() + +if(_CMAKE_IN_TRY_COMPILE AND _CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + include("${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL) endif() if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) @@ -264,13 +271,23 @@ set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) +# Propogate these values to try-compile configurations so the triplet and toolchain load if(NOT _CMAKE_IN_TRY_COMPILE) - file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) - file(TO_CMAKE_PATH "${_VCPKG_ROOT_DIR}" _root_dir) - file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" - "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" - "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" - "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n" - "set(_VCPKG_ROOT_DIR \"${_root_dir}\" CACHE STRING \"\")\n" + if(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(TO_CMAKE_PATH "${_VCPKG_ROOT_DIR}" _root_dir) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n" + "set(_VCPKG_ROOT_DIR \"${_root_dir}\" CACHE STRING \"\")\n" ) + else() + set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + VCPKG_TARGET_TRIPLET + VCPKG_APPLOCAL_DEPS + VCPKG_CHAINLOAD_TOOLCHAIN_FILE + _VCPKG_ROOT_DIR + ) + endif() endif() -- cgit v1.2.3