Allow overriding via cmd

This commit is contained in:
dcvz 2024-05-22 00:52:49 +02:00
parent 93a3cb11ee
commit 0f4db23fe0
3 changed files with 16 additions and 10 deletions

View File

@ -26,9 +26,7 @@ endif()
# Check CPU requirements # Check CPU requirements
include(cmake/ZREDetectSSE42.cmake) include(cmake/ZREDetectSSE42.cmake)
message(STATUS "SUPPORTS_SSE4.2 = ${SUPPORTS_SSE42}")
include(cmake/ZREDetectNEON.cmake) include(cmake/ZREDetectNEON.cmake)
message(STATUS "SUPPORTS_NEON = ${SUPPORTS_NEON}")
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64" AND NOT SUPPORTS_AVX) if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64" AND NOT SUPPORTS_AVX)
message(FATAL_ERROR "FATAL: A CPU supporting SSE4.2 is required.") message(FATAL_ERROR "FATAL: A CPU supporting SSE4.2 is required.")

View File

@ -1,4 +1,8 @@
try_compile(SUPPORTS_NEON if(NOT DEFINED SUPPORTS_NEON)
"${CMAKE_BINARY_DIR}" try_compile(SUPPORTS_NEON
"${CMAKE_SOURCE_DIR}/cmake/checks/cpu_neon.cpp" "${CMAKE_BINARY_DIR}"
) "${CMAKE_SOURCE_DIR}/cmake/checks/cpu_neon.cpp"
)
endif()
message(STATUS "SUPPORTS NEON: ${SUPPORTS_NEON}")

View File

@ -1,4 +1,8 @@
try_compile(SUPPORTS_SSE42 if(NOT DEFINED SUPPORTS_SSE42)
"${CMAKE_BINARY_DIR}" try_compile(SUPPORTS_SSE42
"${CMAKE_SOURCE_DIR}/cmake/checks/cpu_sse42.cpp" "${CMAKE_BINARY_DIR}"
) "${CMAKE_SOURCE_DIR}/cmake/checks/cpu_sse42.cpp"
)
endif()
message(STATUS "SUPPORTS SSE4.2 = ${SUPPORTS_SSE42}")