Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed Apr 5, 2024
1 parent d889a48 commit eabeeee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include_directories(include)
set(src
src/version.c
src/debug.c
src/sm4_tbox.c
src/sm4.c
src/sm4_modes.c
src/sm3.c
src/sm3_hmac.c
Expand Down Expand Up @@ -292,6 +292,13 @@ endif()
# list(APPEND src src/sm3_avx_bmi2.s)
#endif()

option (ENABLE_SM4_TBOX "Enable SM4 merged S-Box implementation" ON)
if (ENABLE_SM4_TBOX)
message(STATUS "ENABLE_SM4_TBOX is ON")
list(FIND src src/sm4.c sm4_index)
list(REMOVE_AT src ${sm4_index})
list(INSERT src ${sm4_index} src/sm4_tbox.c)
endif()

option(ENABLE_SM3_SSE "Enable SM3 SSE assembly implementation" OFF)
if (ENABLE_SM3_SSE)
Expand Down

0 comments on commit eabeeee

Please sign in to comment.