Skip to content

Commit

Permalink
Merge pull request #9541
Browse files Browse the repository at this point in the history
03e593c cmake: lowercase ARCH_ID (tobtoht)
  • Loading branch information
luigi1111 committed Dec 23, 2024
2 parents 885b6a0 + 03e593c commit 8ed1287
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "def
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
set(ARCH_ID "${CMAKE_SYSTEM_PROCESSOR}")
# On Windows, CMake sets CMAKE{_HOST,}_SYSTEM_PROCESSOR to the value of the
# PROCESSOR_ARCHITECTURE environment variable. On some systems it may be set to
# AMD64. Lowercase it to ensure checks for "x86_64" or "amd64" work as expected.
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_ID)
else()
set(ARCH_ID "${ARCH}")
endif()
Expand Down

0 comments on commit 8ed1287

Please sign in to comment.