diff options
author | daMaex <damaex@live.de> | 2019-11-02 11:04:31 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-18 23:45:05 +0100 |
commit | 67696322ea0ff74716c79ac655f5878176cf0743 (patch) | |
tree | e36c3ce9b373be04adbf67629b8908fd57db3198 /dep/argon2/CMakeLists.txt | |
parent | 657fab8cb952783f3b5c17221cc70e621169f900 (diff) |
Core: updated argon2 to latest release (#23893)
* - updated argon2 to latest release from https://github.com/P-H-C/phc-winner-argon2
- modified CMakeLists.txt to use the reference implementation on aarch64
* fixed indentation
* added ARGON2_NO_THREADS definition to argon2 library
* better indentation
(cherry picked from commit ce916165e2f47446593d2e83a23434702397918f)
Diffstat (limited to 'dep/argon2/CMakeLists.txt')
-rw-r--r-- | dep/argon2/CMakeLists.txt | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/dep/argon2/CMakeLists.txt b/dep/argon2/CMakeLists.txt index c8f965c9437..8302406d68b 100644 --- a/dep/argon2/CMakeLists.txt +++ b/dep/argon2/CMakeLists.txt @@ -9,18 +9,31 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. file(GLOB_RECURSE sources *.c) + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + list(REMOVE_ITEM sources + ${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c) +else() + list(REMOVE_ITEM sources + ${CMAKE_CURRENT_SOURCE_DIR}/argon2/ref.c) +endif() + add_library(argon2 STATIC -${sources}) + ${sources}) + +target_compile_definitions(argon2 + PRIVATE + -DARGON2_NO_THREADS) target_include_directories(argon2 -PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(argon2 -PRIVATE - trinity-dependency-interface) + PRIVATE + trinity-dependency-interface) set_target_properties(argon2 -PROPERTIES - FOLDER - "dep") + PROPERTIES + FOLDER + "dep") |