Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake-user] Don't use internal toolchains #27782

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions scripts/test_ports/cmake-user/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ else()
vcpkg_find_acquire_program(NINJA)
endif()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is microsoft/vcpkg-tool#350

if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
z_vcpkg_select_default_vcpkg_chainload_toolchain()
endif()

function(get_packages out_packages cmake_version)
set(packages "")
if("find-package" IN_LIST FEATURES)
Expand Down Expand Up @@ -112,29 +108,27 @@ function(test_cmake_project)

set(build_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${cmake_version}-${arg_NAME}")
set(base_options
# Interface: CMake
-G "Ninja"
"-DCMAKE_MAKE_PROGRAM=${NINJA}"
"-DCMAKE_VERBOSE_MAKEFILE=ON"
"-DCMAKE_INSTALL_PREFIX=${build_dir}/install"
"-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake"
"-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}"
"-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}"
# Interface: vcpkg.cmake
"-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
"-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}"
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
"-DVCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}"
"-DCMAKE_INSTALL_PREFIX=${build_dir}/install"
"-DVCPKG_MANIFEST_MODE=OFF"
# Interface: project/CMakeLists.txt
"-DCHECK_CMAKE_VERSION=${cmake_version}"
)

if(DEFINED VCPKG_CMAKE_SYSTEM_NAME AND VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
# Interface: CMake
list(APPEND base_options "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
list(APPEND base_options "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
endif()
if(DEFINED VCPKG_PLATFORM_TOOLSET)
list(APPEND base_options "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}")
endif()
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Expand Down