aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities/CMakeLists.txt')
-rw-r--r--src/blockchain_utilities/CMakeLists.txt68
1 files changed, 67 insertions, 1 deletions
diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt
index 338ec3e4b..37bca671f 100644
--- a/src/blockchain_utilities/CMakeLists.txt
+++ b/src/blockchain_utilities/CMakeLists.txt
@@ -28,7 +28,9 @@
set(blocksdat "")
if(PER_BLOCK_CHECKPOINT)
- if(APPLE)
+ if(APPLE AND DEPENDS)
+ add_custom_command(OUTPUT blocksdat.o MAIN_DEPENDENCY ../blocks/checkpoints.dat COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && touch stub.c && ${CMAKE_C_COMPILER} --target=x86_64-apple-darwin11 -o stub.o -c stub.c COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_LINKER} -r -sectcreate __DATA __blocks_dat ../blocks/checkpoints.dat -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o stub.o && rm -f stub.*)
+ elseif(APPLE AND NOT DEPENDS)
add_custom_command(OUTPUT blocksdat.o MAIN_DEPENDENCY ../blocks/checkpoints.dat COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && touch stub.c && ${CMAKE_C_COMPILER} -o stub.o -c stub.c COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_LINKER} ${LD_RAW_FLAGS} -r -sectcreate __DATA __blocks_dat ../blocks/checkpoints.dat -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o stub.o && rm -f stub.*)
else()
add_custom_command(OUTPUT blocksdat.o MAIN_DEPENDENCY ../blocks/checkpoints.dat COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && cp ../blocks/checkpoints.dat blocks.dat && ${CMAKE_LINKER} ${LD_RAW_FLAGS} -r -b binary -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o blocks.dat && rm -f blocks.dat)
@@ -91,6 +93,28 @@ monero_private_headers(blockchain_usage
+set(blockchain_ancestry_sources
+ blockchain_ancestry.cpp
+ )
+
+set(blockchain_ancestry_private_headers)
+
+monero_private_headers(blockchain_ancestry
+ ${blockchain_ancestry_private_headers})
+
+
+
+set(blockchain_depth_sources
+ blockchain_depth.cpp
+ )
+
+set(blockchain_depth_private_headers)
+
+monero_private_headers(blockchain_depth
+ ${blockchain_depth_private_headers})
+
+
+
monero_add_executable(blockchain_import
${blockchain_import_sources}
${blockchain_import_private_headers}
@@ -183,3 +207,45 @@ set_property(TARGET blockchain_usage
OUTPUT_NAME "monero-blockchain-usage")
install(TARGETS blockchain_usage DESTINATION bin)
+monero_add_executable(blockchain_ancestry
+ ${blockchain_ancestry_sources}
+ ${blockchain_ancestry_private_headers})
+
+target_link_libraries(blockchain_ancestry
+ PRIVATE
+ cryptonote_core
+ blockchain_db
+ version
+ epee
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LIBRARIES})
+
+set_property(TARGET blockchain_ancestry
+ PROPERTY
+ OUTPUT_NAME "monero-blockchain-ancestry")
+install(TARGETS blockchain_ancestry DESTINATION bin)
+
+monero_add_executable(blockchain_depth
+ ${blockchain_depth_sources}
+ ${blockchain_depth_private_headers})
+
+target_link_libraries(blockchain_depth
+ PRIVATE
+ cryptonote_core
+ blockchain_db
+ version
+ epee
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LIBRARIES})
+
+set_property(TARGET blockchain_depth
+ PROPERTY
+ OUTPUT_NAME "monero-blockchain-depth")
+install(TARGETS blockchain_depth DESTINATION bin)
+