From 968d7969c2c524461976efa40438b1e901b6e027 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 25 Oct 2024 18:13:06 +0200 Subject: [PATCH] cmake: make PER_BLOCK_CHECKPOINT an option --- CMakeLists.txt | 7 +------ src/blockchain_utilities/CMakeLists.txt | 2 +- src/daemon/CMakeLists.txt | 2 +- src/device/CMakeLists.txt | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60cda040a..95d08c7e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,14 +383,9 @@ endif() set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}") set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}") -# set this to 0 if per-block checkpoint needs to be disabled -set(PER_BLOCK_CHECKPOINT 1) - +option(PER_BLOCK_CHECKPOINT "Enable per-block checkpoint" ON) if(PER_BLOCK_CHECKPOINT) add_definitions("-DPER_BLOCK_CHECKPOINT") - set(Blocks "blocks") -else() - set(Blocks "") endif() list(INSERT CMAKE_MODULE_PATH 0 diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index a41cd1e53..66c65c4c5 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -148,7 +148,7 @@ target_link_libraries(blockchain_import ${Boost_THREAD_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_LIBRARIES} - ${Blocks}) + $) if(ARCH_WIDTH) target_compile_definitions(blockchain_import diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 3e737ad46..51e811392 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -68,7 +68,7 @@ target_link_libraries(daemon ${ZMQ_LIB} ${GNU_READLINE_LIBRARY} ${EXTRA_LIBRARIES} - ${Blocks}) + $) set_property(TARGET daemon PROPERTY OUTPUT_NAME "monerod") diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index afbcebf47..e8901cd4c 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -78,5 +78,4 @@ target_link_libraries(device ${Boost_SERIALIZATION_LIBRARY} PRIVATE version - ${Blocks} ${EXTRA_LIBRARIES})