mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 20:09:10 +08:00
0af508e510
Submitted upstream as https://github.com/pytorch/cpuinfo/pull/93 Resolves https://github.com/microsoft/vcpkg/issues/24713 Competing resolution of https://github.com/microsoft/vcpkg/pull/24726
49 lines
2.0 KiB
Diff
49 lines
2.0 KiB
Diff
From 99486c3d72cc0aec72992eb95bd46a27f09ff41e Mon Sep 17 00:00:00 2001
|
|
From: Billy Robert O'Neal III <bion@microsoft.com>
|
|
Date: Wed, 15 Jun 2022 13:59:23 -0700
|
|
Subject: [PATCH] Always check for x86-ish with the same regex.
|
|
|
|
On line 68, and in most places, "intel-like" is checked with `i[3-6]86|AMD64|x86(_64)?`, but in these 3 places the (_x64)? was missing.
|
|
|
|
First reported as https://github.com/microsoft/vcpkg/issues/24713
|
|
---
|
|
CMakeLists.txt | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 74364e8..1cdada0 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -319,7 +319,7 @@ ENDIF()
|
|
# ---[ cpuinfo mock library and mock tests
|
|
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS)
|
|
SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}")
|
|
- IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86_64)$")
|
|
+ IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
|
LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c)
|
|
ENDIF()
|
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
|
|
@@ -763,7 +763,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS)
|
|
ADD_TEST(get-current-test get-current-test)
|
|
ENDIF()
|
|
|
|
- IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86_64)$")
|
|
+ IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
|
ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc)
|
|
CPUINFO_TARGET_ENABLE_CXX11(brand-string-test)
|
|
CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test)
|
|
@@ -830,7 +830,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS)
|
|
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo-dump)
|
|
ENDIF()
|
|
|
|
- IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86_64)$")
|
|
+ IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
|
ADD_EXECUTABLE(cpuid-dump tools/cpuid-dump.c)
|
|
CPUINFO_TARGET_ENABLE_C99(cpuid-dump)
|
|
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuid-dump)
|
|
@@ -869,4 +869,3 @@ IF(CPUINFO_BUILD_PKG_CONFIG)
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
|
|
|
ENDIF()
|
|
-
|