Skip to content

Commit

Permalink
toolchains: Restore original intention of CMAKE_CROSSCOMPILING
Browse files Browse the repository at this point in the history
  • Loading branch information
WangWeiLin-MV committed Aug 23, 2024
1 parent fb54487 commit 07a1cdf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions scripts/toolchains/osx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ if(NOT _VCPKG_OSX_TOOLCHAIN)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
set(CMAKE_CROSSCOMPILING OFF CACHE STRING "")
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
# arm64 macOS can run x64 binaries
set(CMAKE_CROSSCOMPILING OFF CACHE STRING "")
endif()

if(NOT DEFINED CMAKE_SYSTEM_VERSION)
Expand Down
6 changes: 0 additions & 6 deletions scripts/toolchains/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
set(CMAKE_CROSSCOMPILING OFF CACHE STRING "")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
# any of the four platforms can run x86 binaries
set(CMAKE_CROSSCOMPILING OFF CACHE STRING "")
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
# arm64 can run binaries of any of the four platforms after Windows 11
set(CMAKE_CROSSCOMPILING OFF CACHE STRING "")
endif()

if(NOT DEFINED CMAKE_SYSTEM_VERSION)
Expand Down

0 comments on commit 07a1cdf

Please sign in to comment.