aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2020-10-26 20:53:21 +0100
committermj-xmr <mjxmr@protonmail.com>2020-10-28 20:08:26 +0100
commit8a282f64c9c99f584d2a1bd06a11ad5651cd2413 (patch)
tree6f145354d796770e5e84ca6b3579b5c1231f7ee3 /src
parentMerge pull request #6902 (diff)
downloadmonero-8a282f64c9c99f584d2a1bd06a11ad5651cd2413.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/blocks/CMakeLists.txt2
2 files changed, 4 insertions, 1 deletions
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}" $<TARGET_OBJECTS:${objlib}>)
+ 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})