Skip to content

Commit fd091a7

Browse files
committed
Include all post-quantum algorithm files in cmake
GH-5407 already included falcon.c, but now we also add sphincs.c, dilithium.c and ext_kyber.c to avoid undefined reference errors.
1 parent d64d73a commit fd091a7

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

cmake/functions.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ function(generate_build_flags)
195195
endif()
196196
if(WOLFSSL_OQS OR WOLFSSL_USER_SETTINGS)
197197
set(BUILD_FALCON "yes" PARENT_SCOPE)
198+
set(BUILD_SPHINCS "yes" PARENT_SCOPE)
199+
set(BUILD_DILITHIUM "yes" PARENT_SCOPE)
200+
set(BUILD_EXT_KYBER "yes" PARENT_SCOPE)
198201
endif()
199202
set(BUILD_INLINE ${WOLFSSL_INLINE} PARENT_SCOPE)
200203
if(WOLFSSL_OCSP OR WOLFSSL_USER_SETTINGS)
@@ -804,6 +807,18 @@ function(generate_lib_src_list LIB_SOURCES)
804807
list(APPEND LIB_SOURCES wolfcrypt/src/falcon.c)
805808
endif()
806809

810+
if(BUILD_SPHINCS)
811+
list(APPEND LIB_SOURCES wolfcrypt/src/sphincs.c)
812+
endif()
813+
814+
if(BUILD_DILITHIUM)
815+
list(APPEND LIB_SOURCES wolfcrypt/src/dilithium.c)
816+
endif()
817+
818+
if(BUILD_EXT_KYBER)
819+
list(APPEND LIB_SOURCES wolfcrypt/src/ext_kyber.c)
820+
endif()
821+
807822
if(BUILD_LIBZ)
808823
list(APPEND LIB_SOURCES wolfcrypt/src/compress.c)
809824
endif()

0 commit comments

Comments
 (0)