Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/CMakeLists.txt
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
endif() | endif() | ||||
option(SECP256K1_USE_ASM "Use assembly if available" ON) | option(SECP256K1_USE_ASM "Use assembly if available" ON) | ||||
if(SECP256K1_USE_ASM) | if(SECP256K1_USE_ASM) | ||||
macro(unsupported_asm_error) | macro(unsupported_asm_error) | ||||
message(FATAL_ERROR | message(FATAL_ERROR | ||||
"Assembly is not supported for your target architecture." | "Assembly is not supported for your target architecture." | ||||
"Re-run cmake with -DSECP256k1_USE_ASM=OFF to disable ASM support" | "Re-run cmake with -DSECP256K1_USE_ASM=OFF to disable ASM support" | ||||
) | ) | ||||
endmacro() | endmacro() | ||||
# Guess the target architecture. | # Guess the target architecture. | ||||
# First check if the CMAKE_C_COMPILER_TARGET is set (should be when | # First check if the CMAKE_C_COMPILER_TARGET is set (should be when | ||||
# cross compiling), then CMAKE_SYSTEM_PROCESSOR as a fallback if meaningful | # cross compiling), then CMAKE_SYSTEM_PROCESSOR as a fallback if meaningful | ||||
# (this is not the case for ARM as the content is highly non standard). | # (this is not the case for ARM as the content is highly non standard). | ||||
if(CMAKE_C_COMPILER_TARGET MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") | if(CMAKE_C_COMPILER_TARGET MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") | ||||
▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines |