mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
[vcpkg.cmake][ports.cmake] Prefer STREQUAL over MATCHES (#23014)
Co-authored-by: Heiko Thiel <heiko.thiel@hpi.de>
This commit is contained in:
parent
eddbb406cf
commit
6a66e95caa
@ -245,21 +245,21 @@ elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64)
|
||||
else()
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
|
||||
if(CMAKE_GENERATOR STREQUAL "Visual Studio 14 2015 Win64")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 14 2015 ARM")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 14 2015")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017 Win64")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017 ARM")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 16 2019$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 16 2019")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 17 2022$")
|
||||
elseif(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
else()
|
||||
find_program(Z_VCPKG_CL cl)
|
||||
|
@ -95,7 +95,7 @@ if(PORT)
|
||||
set(CURRENT_PACKAGES_DIR "${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
if(CMD MATCHES "^BUILD$")
|
||||
if(CMD STREQUAL "BUILD")
|
||||
set(CMAKE_TRIPLET_FILE "${TARGET_TRIPLET_FILE}")
|
||||
if(NOT EXISTS "${CMAKE_TRIPLET_FILE}")
|
||||
message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}")
|
||||
@ -147,7 +147,7 @@ if(CMD MATCHES "^BUILD$")
|
||||
if(DEFINED PORT)
|
||||
include("${SCRIPTS}/build_info.cmake")
|
||||
endif()
|
||||
elseif(CMD MATCHES "^CREATE$")
|
||||
elseif(CMD STREQUAL "CREATE")
|
||||
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}" NATIVE_VCPKG_ROOT_DIR)
|
||||
file(TO_NATIVE_PATH "${DOWNLOADS}" NATIVE_DOWNLOADS)
|
||||
if(NOT DEFINED PORT_PATH)
|
||||
|
Loading…
x
Reference in New Issue
Block a user