Added
Link Here
|
1 |
--- CMakeLists.txt.orig 2021-05-28 02:40:44 UTC |
2 |
+++ CMakeLists.txt |
3 |
@@ -14,29 +14,8 @@ endif() |
4 |
project(chiapos C CXX ASM) |
5 |
|
6 |
# CMake 3.14+ |
7 |
-include(FetchContent) |
8 |
+include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake) |
9 |
|
10 |
-FetchContent_Declare( |
11 |
- pybind11-src |
12 |
- GIT_REPOSITORY https://github.com/pybind/pybind11.git |
13 |
- GIT_TAG v2.6.2 |
14 |
-) |
15 |
-FetchContent_MakeAvailable(pybind11-src) |
16 |
- |
17 |
-FetchContent_Declare( |
18 |
- cxxopts |
19 |
- GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git |
20 |
- GIT_TAG v2.2.1 |
21 |
-) |
22 |
-FetchContent_MakeAvailable(cxxopts) |
23 |
- |
24 |
-FetchContent_Declare( |
25 |
- gulrak |
26 |
- GIT_REPOSITORY https://github.com/gulrak/filesystem.git |
27 |
- GIT_TAG v1.5.6 |
28 |
-) |
29 |
-FetchContent_MakeAvailable(gulrak) |
30 |
- |
31 |
set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib) |
32 |
set(FSE_FILES |
33 |
${FSE_LIB}/fse_compress.c |
34 |
@@ -48,8 +27,8 @@ set(FSE_FILES |
35 |
include_directories( |
36 |
${INCLUDE_DIRECTORIES} |
37 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/include |
38 |
- ${cxxopts_SOURCE_DIR}/include |
39 |
- ${gulrak_SOURCE_DIR}/include/ghc |
40 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/cxxopts/include |
41 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/gulrak/include/ghc |
42 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib |
43 |
${CMAKE_CURRENT_SOURCE_DIR}/src |
44 |
${CMAKE_CURRENT_SOURCE_DIR}/test |
45 |
@@ -132,19 +111,6 @@ ENDIF() |
46 |
|
47 |
pybind11_add_module(chiapos ${CMAKE_CURRENT_SOURCE_DIR}/python-bindings/chiapos.cpp src/chacha8.c ${BLAKE3_SRC}) |
48 |
|
49 |
-add_executable(ProofOfSpace |
50 |
- src/cli.cpp |
51 |
- src/chacha8.c |
52 |
- ${BLAKE3_SRC} |
53 |
-) |
54 |
- |
55 |
-add_executable(RunTests |
56 |
- tests/test-main.cpp |
57 |
- tests/test.cpp |
58 |
- src/chacha8.c |
59 |
- ${BLAKE3_SRC} |
60 |
-) |
61 |
- |
62 |
find_package(Threads REQUIRED) |
63 |
|
64 |
add_library(uint128 STATIC uint128_t/uint128_t.cpp) |
65 |
@@ -152,29 +118,15 @@ target_include_directories(uint128 PUBLIC uint128_t) |
66 |
|
67 |
target_compile_features(fse PUBLIC cxx_std_17) |
68 |
target_compile_features(chiapos PUBLIC cxx_std_17) |
69 |
-target_compile_features(RunTests PUBLIC cxx_std_17) |
70 |
|
71 |
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
72 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
73 |
- target_link_libraries(ProofOfSpace fse Threads::Threads) |
74 |
- target_link_libraries(RunTests fse Threads::Threads) |
75 |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") |
76 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
77 |
- target_link_libraries(ProofOfSpace fse Threads::Threads) |
78 |
- target_link_libraries(RunTests fse Threads::Threads) |
79 |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") |
80 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
81 |
- target_link_libraries(ProofOfSpace fse Threads::Threads) |
82 |
- target_link_libraries(RunTests fse Threads::Threads) |
83 |
elseif (MSVC) |
84 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128) |
85 |
- target_link_libraries(ProofOfSpace fse Threads::Threads uint128) |
86 |
- target_link_libraries(RunTests fse Threads::Threads uint128) |
87 |
else() |
88 |
target_link_libraries(chiapos PRIVATE fse stdc++fs Threads::Threads) |
89 |
- target_link_libraries(ProofOfSpace fse stdc++fs Threads::Threads) |
90 |
- target_link_libraries(RunTests fse stdc++fs Threads::Threads) |
91 |
endif() |
92 |
- |
93 |
-enable_testing() |
94 |
-add_test(NAME RunTests COMMAND RunTests) |