diff --git a/crt/CMakeLists.txt b/crt/CMakeLists.txt index 9710c1ebe..6308dc7d4 100644 --- a/crt/CMakeLists.txt +++ b/crt/CMakeLists.txt @@ -39,13 +39,14 @@ if(UNIX AND NOT APPLE) if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0") set(MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX ON CACHE BOOL "Disable AVX512 on old GCC that not supports it") endif() - if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86|X86|i386|i686") + + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LOWER) + + if(CMAKE_SYSTEM_PROCESSOR_LOWER MATCHES "x86_64|amd64" AND CMAKE_SIZEOF_VOID_P EQUAL 4 OR CMAKE_SYSTEM_PROCESSOR_LOWER MATCHES "x86|i386|i686") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2") endif() - message(STATUS "XXXXXXXXX CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") - message(STATUS "XXXXXXXXX CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") - + message(STATUS "XXXXXXXXX CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") add_subdirectory(aws-lc) endif()