# Build options
option(SECP256K1_BUILD_CPU "Build CPU implementation" ON)
option(SECP256K1_BUILD_CUDA "Build CUDA GPU support" OFF)
option(SECP256K1_BUILD_ROCM "Build ROCm/HIP GPU support (AMD)" OFF)
option(SECP256K1_BUILD_OPENCL "Build OpenCL support" OFF)
option(SECP256K1_BUILD_METAL "Build Apple Metal GPU support" OFF)
# ── Independent GPU feature modules ───────────────────────────────────────────
# Toggle individual GPU operations on/off SEPARATELY from the CPU feature
# modules. The GPU op surface is independent: a consumer may want, for example,
# BIP-324 compiled on the CPU but stripped from the GPU build (or vice-versa).
# Default ON (full GPU op surface, no behaviour change). Turning one OFF removes
# its kernels + backend dispatch from every GPU backend (CUDA/OpenCL/Metal); the
# stable C ABI entry point remains and returns UFSECP_ERR_GPU_UNSUPPORTED.
option(SECP256K1_GPU_BUILD_ZK "GPU ZK ops (knowledge / DLEQ / bulletproof / SNARK witness)" ON)
option(SECP256K1_GPU_BUILD_BIP324 "GPU BIP-324 AEAD encrypt/decrypt ops" ON)
option(SECP256K1_GPU_BUILD_FROST "GPU FROST partial-signature verify op" ON)
option(SECP256K1_GPU_BUILD_BIP352 "GPU BIP-352 silent-payment scan op" ON)
option(SECP256K1_GPU_BUILD_ECDH "GPU ECDH batch op (secret-bearing)" ON)
option(SECP256K1_GPU_BUILD_MSM "GPU multi-scalar multiplication op" ON)
option(SECP256K1_GPU_BUILD_HASH160 "GPU Hash160(pubkey) batch op" ON)
option(SECP256K1_GPU_BUILD_ECRECOVER "GPU ECDSA public-key recovery batch op"