forked from Chia-Network/chiapos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (40 loc) · 1.2 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RELEASE")
ENDIF()
project(chiapos)
set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib)
set(FSE_FILES
${FSE_LIB}/fse_compress.c
${FSE_LIB}/fse_decompress.c
${FSE_LIB}/entropy_common.c
${FSE_LIB}/hist.c
)
include_directories(
${INCLUDE_DIRECTORIES}
${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/test
${CMAKE_CURRENT_SOURCE_DIR}/hellman_example
)
add_library(fse ${FSE_FILES})
add_subdirectory(lib/pybind11)
pybind11_add_module(chiapos ${CMAKE_CURRENT_SOURCE_DIR}/python-bindings/chiapos.cpp)
set (CMAKE_CXX_FLAGS "-g -O3 -Wall -msse2 -msse -march=native -std=c++1z -maes")
add_executable(ProofOfSpace
src/cli.cpp
)
add_executable(HellmanAttacks
src/cli.cpp
)
add_executable(RunTests
tests/test-main.cpp
tests/test.cpp
)
target_link_libraries(chiapos PRIVATE fse)
target_link_libraries(ProofOfSpace fse)
target_link_libraries(HellmanAttacks fse)
target_link_libraries(RunTests fse)