forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpuinfo] Always check for x86-ish with the same regex. (microsoft#25258
) Submitted upstream as pytorch/cpuinfo#93 Resolves microsoft#24713 Competing resolution of microsoft#24726
- Loading branch information
1 parent
3d8f781
commit 0af508e
Showing
5 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 99486c3d72cc0aec72992eb95bd46a27f09ff41e Mon Sep 17 00:00:00 2001 | ||
From: Billy Robert O'Neal III <[email protected]> | ||
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() | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters