Skip to content

Commit

Permalink
argon2: use as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Désaulniers authored and sim590 committed Mar 22, 2017
1 parent 358d8bd commit 9073996
Show file tree
Hide file tree
Showing 28 changed files with 65 additions and 3,829 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "argon2"]
path = argon2
url = https://github.com/P-H-C/phc-winner-argon2
ignore = dirty
22 changes: 15 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ if (NOT OPENDHT_ARGON2)
set(OPENDHT_ARGON2 ON)
endif()
endif ()
if(OPENDHT_ARGON2)
# make sure argon2 submodule is up to date and initialized
message("Initializing Argon2 submodule")
execute_process(COMMAND git submodule update --init)
endif()

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++11 -Wno-return-type -Wall -Wextra -Wnon-virtual-dtor -pedantic-errors -fvisibility=hidden")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMSGPACK_DISABLE_LEGACY_NIL -DMSGPACK_DISABLE_LEGACY_CONVERT")
Expand Down Expand Up @@ -76,12 +81,12 @@ list (APPEND opendht_SOURCES

if (OPENDHT_ARGON2)
list (APPEND opendht_SOURCES
argon2/argon2.c
argon2/core.c
argon2/blake2/blake2b.c
argon2/thread.c
argon2/encoding.c
argon2/ref.c
argon2/src/argon2.c
argon2/src/core.c
argon2/src/blake2/blake2b.c
argon2/src/thread.c
argon2/src/ref.c
argon2/src/encoding.c
)
endif ()

Expand Down Expand Up @@ -116,12 +121,15 @@ configure_file (
@ONLY
)

include_directories (
include_directories(
./
include/
include/opendht/
${CMAKE_CURRENT_BINARY_DIR}/include/
)
if(OPENDHT_ARGON2)
include_directories(argon2/include/)
endif()

if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
Expand Down
4 changes: 0 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ AM_CXXFLAGS = -pthread

SUBDIRS =

if WITH_INCLUDED_ARGON2
SUBDIRS += argon2
endif

SUBDIRS += src

if ENABLE_TOOLS
Expand Down
1 change: 1 addition & 0 deletions argon2
Submodule argon2 added at 6f5427
31 changes: 0 additions & 31 deletions argon2/LICENSE

This file was deleted.

23 changes: 0 additions & 23 deletions argon2/Makefile.am

This file was deleted.

Loading

0 comments on commit 9073996

Please sign in to comment.