-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (25 loc) · 1.26 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
cmake_minimum_required(VERSION 3.3)
project(Replica)
enable_language(C)
enable_language(CXX)
include_directories(BEFORE /usr/local/Cellar/openssl/1.0.2p/include)
find_library(OPENSSL_LIB
ssl
PATHS /usr/lib /usr/local/Cellar/openssl/1.0.2p/lib
NO_DEFAULT_PATH)
find_library(CRYPTO_LIB
crypto
PATHS /usr/lib /usr/local/Cellar/openssl/1.0.2p/lib
NO_DEFAULT_PATH)
find_library(CPPUTEST_LIB CppUTest $ENV{CRYPTO_LIB_PATH})
find_library(CPPUTEST_EXT_LIB CppUTestExt $ENV{CRYPTO_LIB_PATH})
find_library(PROFILE_LIB profile_rt $ENV{CRYPTO_LIB_PATH})
message(${OPENSSL_LIB})
set(CLI_SOURCE_FILES client.c transmit.c mock_data.c stubs.c support.c crypto.c b32.c cid.c crack.c)
set(MOCK_SOURCE_FILES mock_net.cpp)
set(REPLICA_SOURCE_FILES replica.c )
add_executable(find_ips find_ips.c ${CLI_SOURCE_FILES} ${MOCK_SOURCE_FILES})
add_executable(RunAllTests RunAllTests.cpp ${CLI_SOURCE_FILES} ${MOCK_SOURCE_FILES})
target_link_libraries(find_ips ${CPPUTEST_LIB} ${CPPUTEST_EXT_LIB} ${OPENSSL_LIB} ${CRYPTO_LIB} "--coverage")
target_link_libraries(RunAllTests ${CPPUTEST_LIB} ${CPPUTEST_EXT_LIB} ${OPENSSL_LIB} ${CRYPTO_LIB} "--coverage")
target_compile_options(RunAllTests PUBLIC --coverage)