Open Quantum Safe Library Documentation: CMakeLists

# SPDX-License-Identifier: MIT

# This file was generated by
# scripts/copy_from_upstream/copy_from_upstream.py

set(_KYBER_OBJS "")

if(OQS_ENABLE_KEM_kyber_512)
    add_library(kyber_512_ref OBJECT kem_kyber_512.c pqcrystals-kyber_kyber512_ref/cbd.c pqcrystals-kyber_kyber512_ref/indcpa.c pqcrystals-kyber_kyber512_ref/kem.c pqcrystals-kyber_kyber512_ref/ntt.c pqcrystals-kyber_kyber512_ref/poly.c pqcrystals-kyber_kyber512_ref/polyvec.c pqcrystals-kyber_kyber512_ref/reduce.c pqcrystals-kyber_kyber512_ref/symmetric-shake.c pqcrystals-kyber_kyber512_ref/verify.c)
    target_compile_options(kyber_512_ref PUBLIC -DKYBER_K=2)
    target_include_directories(kyber_512_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-kyber_kyber512_ref)
    target_include_directories(kyber_512_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(kyber_512_ref PUBLIC -DKYBER_K=2)
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_512_ref>)
endif()

if(OQS_ENABLE_KEM_kyber_512_avx2)
    add_library(kyber_512_avx2 OBJECT pqcrystals-kyber_kyber512_avx2/basemul.S pqcrystals-kyber_kyber512_avx2/cbd.c pqcrystals-kyber_kyber512_avx2/consts.c pqcrystals-kyber_kyber512_avx2/fq.S pqcrystals-kyber_kyber512_avx2/indcpa.c pqcrystals-kyber_kyber512_avx2/invntt.S pqcrystals-kyber_kyber512_avx2/kem.c pqcrystals-kyber_kyber512_avx2/ntt.S pqcrystals-kyber_kyber512_avx2/poly.c pqcrystals-kyber_kyber512_avx2/polyvec.c pqcrystals-kyber_kyber512_avx2/rejsample.c pqcrystals-kyber_kyber512_avx2/shuffle.S pqcrystals-kyber_kyber512_avx2/symmetric-shake.c pqcrystals-kyber_kyber512_avx2/verify.c)
    target_include_directories(kyber_512_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-kyber_kyber512_avx2)
    target_include_directories(kyber_512_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(kyber_512_avx2 PRIVATE  -mavx2  -mbmi2  -mpopcnt )
    target_compile_options(kyber_512_avx2 PUBLIC -DKYBER_K=2)
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_512_avx2>)
endif()

if(OQS_ENABLE_KEM_kyber_512_aarch64)
    add_library(kyber_512_aarch64 OBJECT oldpqclean_kyber512_aarch64/__asm_base_mul.S oldpqclean_kyber512_aarch64/__asm_iNTT.S oldpqclean_kyber512_aarch64/__asm_NTT.S oldpqclean_kyber512_aarch64/__asm_poly.S oldpqclean_kyber512_aarch64/cbd.c oldpqclean_kyber512_aarch64/feat.S oldpqclean_kyber512_aarch64/fips202x2.c oldpqclean_kyber512_aarch64/indcpa.c oldpqclean_kyber512_aarch64/kem.c oldpqclean_kyber512_aarch64/neon_poly.c oldpqclean_kyber512_aarch64/neon_polyvec.c oldpqclean_kyber512_aarch64/neon_symmetric-shake.c oldpqclean_kyber512_aarch64/ntt.c oldpqclean_kyber512_aarch64/poly.c oldpqclean_kyber512_aarch64/polyvec.c oldpqclean_kyber512_aarch64/reduce.c oldpqclean_kyber512_aarch64/rejsample.c oldpqclean_kyber512_aarch64/symmetric-shake.c oldpqclean_kyber512_aarch64/verify.c)
    target_include_directories(kyber_512_aarch64 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/oldpqclean_kyber512_aarch64)
    target_include_directories(kyber_512_aarch64 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
        target_compile_definitions(kyber_512_aarch64 PRIVATE old_gas_syntax)
    endif()
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_512_aarch64>)
endif()

if(OQS_ENABLE_KEM_kyber_768)
    add_library(kyber_768_ref OBJECT kem_kyber_768.c pqcrystals-kyber_kyber768_ref/cbd.c pqcrystals-kyber_kyber768_ref/indcpa.c pqcrystals-kyber_kyber768_ref/kem.c pqcrystals-kyber_kyber768_ref/ntt.c pqcrystals-kyber_kyber768_ref/poly.c pqcrystals-kyber_kyber768_ref/polyvec.c pqcrystals-kyber_kyber768_ref/reduce.c pqcrystals-kyber_kyber768_ref/symmetric-shake.c pqcrystals-kyber_kyber768_ref/verify.c)
    target_compile_options(kyber_768_ref PUBLIC -DKYBER_K=3)
    target_include_directories(kyber_768_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-kyber_kyber768_ref)
    target_include_directories(kyber_768_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(kyber_768_ref PUBLIC -DKYBER_K=3)
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_768_ref>)
endif()

if(OQS_ENABLE_KEM_kyber_768_avx2)
    add_library(kyber_768_avx2 OBJECT pqcrystals-kyber_kyber768_avx2/basemul.S pqcrystals-kyber_kyber768_avx2/cbd.c pqcrystals-kyber_kyber768_avx2/consts.c pqcrystals-kyber_kyber768_avx2/fq.S pqcrystals-kyber_kyber768_avx2/indcpa.c pqcrystals-kyber_kyber768_avx2/invntt.S pqcrystals-kyber_kyber768_avx2/kem.c pqcrystals-kyber_kyber768_avx2/ntt.S pqcrystals-kyber_kyber768_avx2/poly.c pqcrystals-kyber_kyber768_avx2/polyvec.c pqcrystals-kyber_kyber768_avx2/rejsample.c pqcrystals-kyber_kyber768_avx2/shuffle.S pqcrystals-kyber_kyber768_avx2/symmetric-shake.c pqcrystals-kyber_kyber768_avx2/verify.c)
    target_include_directories(kyber_768_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-kyber_kyber768_avx2)
    target_include_directories(kyber_768_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(kyber_768_avx2 PRIVATE  -mavx2  -mbmi2  -mpopcnt )
    target_compile_options(kyber_768_avx2 PUBLIC -DKYBER_K=3)
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_768_avx2>)
endif()

if(OQS_ENABLE_KEM_kyber_768_aarch64)
    add_library(kyber_768_aarch64 OBJECT oldpqclean_kyber768_aarch64/__asm_base_mul.S oldpqclean_kyber768_aarch64/__asm_iNTT.S oldpqclean_kyber768_aarch64/__asm_NTT.S oldpqclean_kyber768_aarch64/__asm_poly.S oldpqclean_kyber768_aarch64/cbd.c oldpqclean_kyber768_aarch64/feat.S oldpqclean_kyber768_aarch64/fips202x2.c oldpqclean_kyber768_aarch64/indcpa.c oldpqclean_kyber768_aarch64/kem.c oldpqclean_kyber768_aarch64/neon_poly.c oldpqclean_kyber768_aarch64/neon_polyvec.c oldpqclean_kyber768_aarch64/neon_symmetric-shake.c oldpqclean_kyber768_aarch64/ntt.c oldpqclean_kyber768_aarch64/poly.c oldpqclean_kyber768_aarch64/polyvec.c oldpqclean_kyber768_aarch64/reduce.c oldpqclean_kyber768_aarch64/rejsample.c oldpqclean_kyber768_aarch64/symmetric-shake.c oldpqclean_kyber768_aarch64/verify.c)
    target_include_directories(kyber_768_aarch64 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/oldpqclean_kyber768_aarch64)
    target_include_directories(kyber_768_aarch64 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
        target_compile_definitions(kyber_768_aarch64 PRIVATE old_gas_syntax)
    endif()
    set(_KYBER_OBJS ${_KYBER_OBJS} $<TARGET_OBJECTS:kyber_768_aarch64>)
endif()

if(OQS_ENABLE_KEM_kyber_1024)
    add_library(kyber_1024_ref OBJECT kem_kyber_1024.c pqcrystals-kyber_kyber1024_ref/cbd.c pqcrystals-kyber_kyber1024_ref/indcpa.c pqcrystals-kyber_kyber1024_ref/kem.c pqcrystals-kyber_kyber1024_ref/ntt.c pqcrystals-kyber_kyber1024_ref/poly.c pqcrystals-kyber_kyber1024_ref/polyvec.c pqcrystals-kyber_kyber1024_ref/reduce.c pqcrystals-kyber_kyber1024_ref/symmetric-shake.c pqcrystals-kyber_kyber1024_ref/verify.c)
    target_compile_options(kyber_1024_ref PUBLIC -DKYBER_K=4)
    target_include_direct