Skip to content

Commit

Permalink
Include all post-quantum algorithm files in cmake
Browse files Browse the repository at this point in the history
GH-5407 already included falcon.c, but now we also add sphincs.c,
dilithium.c and ext_kyber.c to avoid undefined reference errors.
  • Loading branch information
iyanmv committed Jul 11, 2023
1 parent d64d73a commit fd091a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ function(generate_build_flags)
endif()
if(WOLFSSL_OQS OR WOLFSSL_USER_SETTINGS)
set(BUILD_FALCON "yes" PARENT_SCOPE)
set(BUILD_SPHINCS "yes" PARENT_SCOPE)
set(BUILD_DILITHIUM "yes" PARENT_SCOPE)
set(BUILD_EXT_KYBER "yes" PARENT_SCOPE)
endif()
set(BUILD_INLINE ${WOLFSSL_INLINE} PARENT_SCOPE)
if(WOLFSSL_OCSP OR WOLFSSL_USER_SETTINGS)
Expand Down Expand Up @@ -804,6 +807,18 @@ function(generate_lib_src_list LIB_SOURCES)
list(APPEND LIB_SOURCES wolfcrypt/src/falcon.c)
endif()

if(BUILD_SPHINCS)
list(APPEND LIB_SOURCES wolfcrypt/src/sphincs.c)
endif()

if(BUILD_DILITHIUM)
list(APPEND LIB_SOURCES wolfcrypt/src/dilithium.c)
endif()

if(BUILD_EXT_KYBER)
list(APPEND LIB_SOURCES wolfcrypt/src/ext_kyber.c)
endif()

if(BUILD_LIBZ)
list(APPEND LIB_SOURCES wolfcrypt/src/compress.c)
endif()
Expand Down

0 comments on commit fd091a7

Please sign in to comment.