-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
74 lines (56 loc) · 2.01 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.0)
project(zcash_testing)
set(CMAKE_C_COMPILER "gcc")
#set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -std=c++11 -Wall -pedantic -march=native")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -std=c++11 -march=native -fprofile-instr-generate=code.profraw")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -std=c++11 -Wall -pedantic -march=native -fprofile-instr-use=code.profdata")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -Wl,--no-export-dynamic")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LIB_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(ZCEQ_SOLVER_SOURCES_COMMON
zceq_solver.cpp
zceq_blake2b.cpp
zceq_space_allocator.cpp
blake2/blake2b-ref.c
blake2/blake2b-compress-ref.c
blake2/blake2b-compress-avx2.c
blake2/blake2b-compress-sse41.c
blake2/blake2b-compress-ssse3.c
blake2b-asm/zcblake2_avx1.o
blake2b-asm/zcblake2_avx2.o
libc_compatibility.c
)
set_source_files_properties(
blake2b-asm/asm/zcblake2_avx1.o
PROPERTIES
EXTERNAL_OBJECT true
GENERATED true
)
set_source_files_properties(
blake2b-asm/asm/zcblake2_avx2.o
PROPERTIES
EXTERNAL_OBJECT true
GENERATED true
)
#add_executable(zcash_testing ${SOURCE_FILES})
# target_link_libraries(zcash_testing)
add_executable(zceq_benchmark
${ZCEQ_SOLVER_SOURCES_COMMON}
benchmark.cpp
)
add_library(zceq_solver_sh SHARED
${ZCEQ_SOLVER_SOURCES_COMMON}
lib_main.cpp)
###########
#include_directories(deps/zcash/src/)
#include_directories(deps/zcash/depends/x86_64-unknown-linux-gnu/include)
#set(ZCEQ_CLI_SOURCES_V0
# zceq_solver_v0.cpp
# # zceq_main.cpp
# zceq_space_allocator.cpp)
#link_directories(../libsodium/src/libsodium/.libs)
#add_executable(zceq_solver_v0 ${ZCEQ_CLI_SOURCES_V0})
#target_link_libraries(zceq_solver_v0
# libsodium.a
# libstdc++.a)