From 8a282f64c9c99f584d2a1bd06a11ad5651cd2413 Mon Sep 17 00:00:00 2001 From: mj-xmr Date: Mon, 26 Oct 2020 20:53:21 +0100 Subject: Add RELINK_TARGETS, monero_add_target_no_relink and use monero_add_executable/monero_add_library where possible (mj-xmr) Add monero_add_minimal_executable and use in tests This is done in order not to have to relink targets, when just an .so changed, but not its interface. --- src/CMakeLists.txt | 3 +++ src/blocks/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 07d4d58c3..9904c5de7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -75,6 +75,8 @@ function (monero_add_executable name) PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") enable_stack_trace("${name}") + + monero_set_target_no_relink("${name}") endfunction () function (monero_add_library name) @@ -92,6 +94,7 @@ function (monero_add_library_with_deps) set(objlib obj_${MONERO_ADD_LIBRARY_NAME}) add_library(${objlib} OBJECT ${MONERO_ADD_LIBRARY_SOURCES}) add_library("${MONERO_ADD_LIBRARY_NAME}" $) + monero_set_target_no_relink("${MONERO_ADD_LIBRARY_NAME}") if (MONERO_ADD_LIBRARY_DEPENDS) add_dependencies(${objlib} ${MONERO_ADD_LIBRARY_DEPENDS}) endif() diff --git a/src/blocks/CMakeLists.txt b/src/blocks/CMakeLists.txt index 051c60886..445596a66 100644 --- a/src/blocks/CMakeLists.txt +++ b/src/blocks/CMakeLists.txt @@ -45,4 +45,4 @@ foreach(BLOB_NAME checkpoints testnet_blocks stagenet_blocks) ) endforeach() -add_library(blocks STATIC blocks.cpp ${GENERATED_SOURCES}) +monero_add_library(blocks blocks.cpp ${GENERATED_SOURCES}) -- cgit v1.2.3