-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
60 lines (49 loc) · 1.39 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required (VERSION 2.8)
project (ArgonValidationService)
set (CMAKE_CXX_STANDARD 11)
set (ArgonValidationService_VERSION_MAJOR 0)
set (ArgonValidationService_VERSION_MINOR 1)
set (ArgonValidationService_VERSION_REVISION 0)
find_package (Threads)
find_path(MTHD_INCLUDE_DIR
NAMES
microhttpd.h
PATHS
/opt/local
/usr/local
/usr
ENV "PROGRAMFILES(X86)"
ENV "HWLOC_ROOT"
PATH_SUFFIXES
include)
find_library(MHTD
NAMES
microhttpd
libmicrohttpd.lib
PATHS
ENV "MICROHTTPD_ROOT"
PATH_SUFFIXES
lib)
if("${MHTD}" STREQUAL "MHTD-NOTFOUND")
message(FATAL_ERROR "microhttpd library NOT found")
else()
set(LIBS ${LIBS} ${MHTD})
include_directories(AFTER ${MTHD_INCLUDE_DIR})
endif()
set(SOURCE
main.cpp
arguments.cpp
argon2/blake2/blake2b.c
argon2/argon2.cpp
argon2/argon2profile_1_1_524288.c
argon2/argon2profile_4_4_16384.c
argon2/implementation.c
argon2/base64.cpp)
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
include_directories("${PROJECT_BINARY_DIR}")
add_executable(ArgonValidationService ${SOURCE})
target_compile_options(ArgonValidationService PRIVATE -march=native -mtune=native -O3)
target_link_libraries(ArgonValidationService ${LIBS} ${CMAKE_THREAD_LIBS_INIT})