Lines 1-17
Link Here
|
1 |
--- CMakeLists.txt.orig 2021-05-28 02:40:44 UTC |
1 |
--- CMakeLists.txt.orig 2021-12-03 19:59:40 UTC |
2 |
+++ CMakeLists.txt |
2 |
+++ CMakeLists.txt |
3 |
@@ -14,29 +14,7 @@ endif() |
3 |
@@ -14,33 +14,7 @@ endif() |
4 |
project(chiapos C CXX ASM) |
4 |
project(chiapos C CXX ASM) |
5 |
|
5 |
|
6 |
# CMake 3.14+ |
6 |
# CMake 3.14+ |
7 |
-include(FetchContent) |
7 |
-include(FetchContent) |
8 |
|
8 |
|
|
|
9 |
-if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") |
10 |
-include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake) |
11 |
-else() |
9 |
-FetchContent_Declare( |
12 |
-FetchContent_Declare( |
10 |
- pybind11-src |
13 |
- pybind11-src |
11 |
- GIT_REPOSITORY https://github.com/pybind/pybind11.git |
14 |
- GIT_REPOSITORY https://github.com/pybind/pybind11.git |
12 |
- GIT_TAG v2.6.2 |
15 |
- GIT_TAG v2.7.1 |
13 |
-) |
16 |
-) |
14 |
-FetchContent_MakeAvailable(pybind11-src) |
17 |
-FetchContent_MakeAvailable(pybind11-src) |
|
|
18 |
-endif() |
15 |
- |
19 |
- |
16 |
-FetchContent_Declare( |
20 |
-FetchContent_Declare( |
17 |
- cxxopts |
21 |
- cxxopts |
Lines 30-38
Link Here
|
30 |
set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib) |
34 |
set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib) |
31 |
set(FSE_FILES |
35 |
set(FSE_FILES |
32 |
${FSE_LIB}/fse_compress.c |
36 |
${FSE_LIB}/fse_compress.c |
33 |
@@ -48,8 +26,8 @@ set(FSE_FILES |
37 |
@@ -51,9 +25,10 @@ set(FSE_FILES |
|
|
38 |
|
34 |
include_directories( |
39 |
include_directories( |
35 |
${INCLUDE_DIRECTORIES} |
40 |
${INCLUDE_DIRECTORIES} |
|
|
41 |
+ ${CMAKE_INSTALL_PREFIX}/include |
36 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/include |
42 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/include |
37 |
- ${cxxopts_SOURCE_DIR}/include |
43 |
- ${cxxopts_SOURCE_DIR}/include |
38 |
- ${gulrak_SOURCE_DIR}/include/ghc |
44 |
- ${gulrak_SOURCE_DIR}/include/ghc |
Lines 41-47
Link Here
|
41 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib |
47 |
${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib |
42 |
${CMAKE_CURRENT_SOURCE_DIR}/src |
48 |
${CMAKE_CURRENT_SOURCE_DIR}/src |
43 |
${CMAKE_CURRENT_SOURCE_DIR}/test |
49 |
${CMAKE_CURRENT_SOURCE_DIR}/test |
44 |
@@ -130,8 +108,6 @@ set(BLAKE3_SRC |
50 |
@@ -134,8 +109,6 @@ set(BLAKE3_SRC |
45 |
) |
51 |
) |
46 |
ENDIF() |
52 |
ENDIF() |
47 |
|
53 |
|
Lines 50-57
Link Here
|
50 |
add_executable(ProofOfSpace |
56 |
add_executable(ProofOfSpace |
51 |
src/cli.cpp |
57 |
src/cli.cpp |
52 |
src/chacha8.c |
58 |
src/chacha8.c |
53 |
@@ -145,33 +121,30 @@ add_executable(RunTests |
59 |
@@ -148,13 +121,6 @@ IF (BUILD_PROOF_OF_SPACE_STATICALLY) |
54 |
${BLAKE3_SRC} |
60 |
target_link_libraries(ProofOfSpace -static -Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive) |
|
|
61 |
ENDIF() |
62 |
|
63 |
-FetchContent_Declare( |
64 |
- Catch2 |
65 |
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git |
66 |
- GIT_TAG v2.13.7 |
67 |
-) |
68 |
-FetchContent_MakeAvailable(Catch2) |
69 |
- |
70 |
add_executable(RunTests |
71 |
tests/test-main.cpp |
72 |
tests/test.cpp |
73 |
@@ -166,18 +132,20 @@ target_link_libraries(RunTests |
74 |
PRIVATE |
75 |
fse |
76 |
Threads::Threads |
77 |
- Catch2::Catch2 |
55 |
) |
78 |
) |
56 |
|
79 |
|
57 |
+install(TARGETS ProofOfSpace DESTINATION bin) |
80 |
+install(TARGETS ProofOfSpace DESTINATION bin) |
Lines 66-89
Link Here
|
66 |
-target_compile_features(chiapos PUBLIC cxx_std_17) |
89 |
-target_compile_features(chiapos PUBLIC cxx_std_17) |
67 |
target_compile_features(RunTests PUBLIC cxx_std_17) |
90 |
target_compile_features(RunTests PUBLIC cxx_std_17) |
68 |
|
91 |
|
|
|
92 |
+ |
69 |
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
93 |
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
70 |
- target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
94 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
71 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
95 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
72 |
target_link_libraries(RunTests fse Threads::Threads) |
96 |
@@ -185,8 +153,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") |
73 |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") |
97 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
74 |
- target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
|
|
75 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
98 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
76 |
target_link_libraries(RunTests fse Threads::Threads) |
|
|
77 |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") |
99 |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") |
78 |
- target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
100 |
- target_link_libraries(chiapos PRIVATE fse Threads::Threads) |
79 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
101 |
target_link_libraries(ProofOfSpace fse Threads::Threads) |
80 |
target_link_libraries(RunTests fse Threads::Threads) |
102 |
+ include(${CMAKE_INSTALL_PREFIX}/lib/cmake/Catch2/Catch.cmake) |
81 |
elseif (MSVC) |
103 |
elseif (MSVC) |
82 |
- target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128) |
104 |
target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128) |
83 |
target_link_libraries(ProofOfSpace fse Threads::Threads uint128) |
105 |
target_link_libraries(ProofOfSpace fse Threads::Threads uint128) |
84 |
target_link_libraries(RunTests fse Threads::Threads uint128) |
|
|
85 |
else() |
86 |
- target_link_libraries(chiapos PRIVATE fse stdc++fs Threads::Threads) |
87 |
target_link_libraries(ProofOfSpace fse stdc++fs Threads::Threads) |
88 |
target_link_libraries(RunTests fse stdc++fs Threads::Threads) |
89 |
endif() |