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.
This commit is contained in:
mj-xmr 2020-10-26 20:53:21 +01:00
parent 8b3b106ad1
commit 8a282f64c9
18 changed files with 54 additions and 33 deletions

View file

@ -37,7 +37,7 @@ set(crypto_sources
set(crypto_headers
crypto-tests.h)
add_executable(cncrypto-tests
monero_add_minimal_executable(cncrypto-tests
${crypto_sources}
${crypto_headers})
target_link_libraries(cncrypto-tests
@ -53,7 +53,7 @@ add_test(
NAME cncrypto
COMMAND cncrypto-tests "${CMAKE_CURRENT_SOURCE_DIR}/tests.txt")
add_executable(cnv4-jit-tests cnv4-jit.c)
monero_add_minimal_executable(cnv4-jit-tests cnv4-jit.c)
target_link_libraries(cnv4-jit-tests
PRIVATE
common