aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2016-09-17 13:59:29 -0400
committerredfish <redfish@galactica.pw>2016-09-18 02:56:26 -0400
commite1c7af35d47c6f54628418f67128074c1bcd4858 (patch)
tree70bc29dbab48ac5e7d6c1b51dbbe0974704e7214 /tests
parentcrypto: armv7: slow-hash: remove redundant source include (diff)
downloadmonero-e1c7af35d47c6f54628418f67128074c1bcd4858.tar.xz
cmake: transitive deps and remove deprecated LINK_*
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/core_proxy/CMakeLists.txt9
-rw-r--r--tests/core_tests/CMakeLists.txt6
-rw-r--r--tests/crypto/CMakeLists.txt4
-rw-r--r--tests/daemon_tests/CMakeLists.txt5
-rw-r--r--tests/difficulty/CMakeLists.txt5
-rw-r--r--tests/functional_tests/CMakeLists.txt4
-rw-r--r--tests/hash/CMakeLists.txt5
-rw-r--r--tests/libwallet_api_tests/CMakeLists.txt6
-rw-r--r--tests/net_load_tests/CMakeLists.txt22
-rw-r--r--tests/performance_tests/CMakeLists.txt3
-rw-r--r--tests/unit_tests/CMakeLists.txt8
12 files changed, 35 insertions, 44 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 75e75f258..65eab49d7 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -84,7 +84,7 @@ add_executable(hash-target-tests
${hash_targets_sources}
${hash_targets_headers})
target_link_libraries(hash-target-tests
- LINK_PRIVATE
+ PRIVATE
cryptonote_core)
set_property(TARGET hash-target-tests
PROPERTY
diff --git a/tests/core_proxy/CMakeLists.txt b/tests/core_proxy/CMakeLists.txt
index 2494a688c..3b86660c2 100644
--- a/tests/core_proxy/CMakeLists.txt
+++ b/tests/core_proxy/CMakeLists.txt
@@ -36,17 +36,12 @@ add_executable(core_proxy
${core_proxy_sources}
${core_proxy_headers})
target_link_libraries(core_proxy
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
cryptonote_protocol
p2p
- ${UPNP_LIBRARIES}
- ${Boost_CHRONO_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
- ${EXPAT_LIBRARIES})
+ ${EXTRA_LIBRARIES})
set_property(TARGET core_proxy
PROPERTY
FOLDER "tests")
diff --git a/tests/core_tests/CMakeLists.txt b/tests/core_tests/CMakeLists.txt
index 6f07fbd25..004b03492 100644
--- a/tests/core_tests/CMakeLists.txt
+++ b/tests/core_tests/CMakeLists.txt
@@ -62,14 +62,10 @@ add_executable(coretests
${core_tests_sources}
${core_tests_headers})
target_link_libraries(coretests
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
p2p
- ${Boost_CHRONO_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_SYSTEM_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
- ${EXPAT_LIBRARIES}
${EXTRA_LIBRARIES})
set_property(TARGET coretests
PROPERTY
diff --git a/tests/crypto/CMakeLists.txt b/tests/crypto/CMakeLists.txt
index 86946aa5c..9c59cd79e 100644
--- a/tests/crypto/CMakeLists.txt
+++ b/tests/crypto/CMakeLists.txt
@@ -41,7 +41,9 @@ add_executable(crypto-tests
${crypto_sources}
${crypto_headers})
target_link_libraries(crypto-tests
- ${Boost_SYSTEM_LIBRARY})
+ PRIVATE
+ ${Boost_SYSTEM_LIBRARY}
+ ${EXTRA_LIBRARIES})
set_property(TARGET crypto-tests
PROPERTY
FOLDER "tests")
diff --git a/tests/daemon_tests/CMakeLists.txt b/tests/daemon_tests/CMakeLists.txt
index ae11ab5d5..5e2e4ad1e 100644
--- a/tests/daemon_tests/CMakeLists.txt
+++ b/tests/daemon_tests/CMakeLists.txt
@@ -35,15 +35,14 @@ add_executable(transfers
${transfers_sources}
${transfers_headers})
target_link_libraries(transfers
- LINK_PRIVATE
+ PRIVATE
useragent
rpc
cryptonote_core
crypto
common
epee
- ${GTEST_LIBRARIES}
- ${Boost_LIBRARIES})
+ ${GTEST_LIBRARIES})
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_transfers")
add_custom_target(test_transfers
diff --git a/tests/difficulty/CMakeLists.txt b/tests/difficulty/CMakeLists.txt
index a9d24b981..9f1f04fe4 100644
--- a/tests/difficulty/CMakeLists.txt
+++ b/tests/difficulty/CMakeLists.txt
@@ -35,8 +35,9 @@ add_executable(difficulty-tests
${difficulty_sources}
${difficulty_headers})
target_link_libraries(difficulty-tests
- LINK_PRIVATE
- cryptonote_core)
+ PRIVATE
+ cryptonote_core
+ ${EXTRA_LIBRARIES})
set_property(TARGET difficulty-tests
PROPERTY
FOLDER "tests")
diff --git a/tests/functional_tests/CMakeLists.txt b/tests/functional_tests/CMakeLists.txt
index 41f3a9ec1..7e1845114 100644
--- a/tests/functional_tests/CMakeLists.txt
+++ b/tests/functional_tests/CMakeLists.txt
@@ -39,13 +39,13 @@ add_executable(functional_tests
${functional_tests_sources}
${functional_tests_headers})
target_link_libraries(functional_tests
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
wallet
common
crypto
- ${UNBOUND_LIBRARY}
${Boost_REGEX_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
set_property(TARGET functional_tests
diff --git a/tests/hash/CMakeLists.txt b/tests/hash/CMakeLists.txt
index 426ecf6bf..7f79ee939 100644
--- a/tests/hash/CMakeLists.txt
+++ b/tests/hash/CMakeLists.txt
@@ -35,8 +35,9 @@ add_executable(hash-tests
${hash_sources}
${hash_headers})
target_link_libraries(hash-tests
- LINK_PRIVATE
- crypto)
+ PRIVATE
+ crypto
+ ${EXTRA_LIBRARIES})
set_property(TARGET hash-tests
PROPERTY
FOLDER "tests")
diff --git a/tests/libwallet_api_tests/CMakeLists.txt b/tests/libwallet_api_tests/CMakeLists.txt
index 416192cce..fc9a6d57b 100644
--- a/tests/libwallet_api_tests/CMakeLists.txt
+++ b/tests/libwallet_api_tests/CMakeLists.txt
@@ -38,9 +38,13 @@ add_executable(libwallet_api_tests
${libwallet_api_tests_headers})
target_link_libraries(libwallet_api_tests
- LINK_PRIVATE
+ PRIVATE
wallet
+ ${Boost_SERIALIZATION_LIBRARY}
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
${GTEST_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
set_property(TARGET libwallet_api_tests
diff --git a/tests/net_load_tests/CMakeLists.txt b/tests/net_load_tests/CMakeLists.txt
index 2c97acf51..58f9cc5af 100644
--- a/tests/net_load_tests/CMakeLists.txt
+++ b/tests/net_load_tests/CMakeLists.txt
@@ -36,16 +36,15 @@ add_executable(net_load_tests_clt
${clt_sources}
${clt_headers})
target_link_libraries(net_load_tests_clt
- LINK_PRIVATE
- otshell_utils
- p2p
- cryptonote_core
+ PRIVATE
+ otshell_utils
+ p2p
+ cryptonote_core
${GTEST_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
set(srv_sources
@@ -58,16 +57,15 @@ add_executable(net_load_tests_srv
${srv_sources}
${srv_headers})
target_link_libraries(net_load_tests_srv
- LINK_PRIVATE
- otshell_utils
- p2p
- cryptonote_core
+ PRIVATE
+ otshell_utils
+ p2p
+ cryptonote_core
${GTEST_LIBRARIES}
${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
set_property(TARGET net_load_tests_clt net_load_tests_srv
diff --git a/tests/performance_tests/CMakeLists.txt b/tests/performance_tests/CMakeLists.txt
index 8ca5ece8e..37accb393 100644
--- a/tests/performance_tests/CMakeLists.txt
+++ b/tests/performance_tests/CMakeLists.txt
@@ -48,11 +48,10 @@ add_executable(performance_tests
${performance_tests_sources}
${performance_tests_headers})
target_link_libraries(performance_tests
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
common
crypto
- ${UNBOUND_LIBRARY}
${Boost_CHRONO_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt
index d36c2748c..b7fdc333f 100644
--- a/tests/unit_tests/CMakeLists.txt
+++ b/tests/unit_tests/CMakeLists.txt
@@ -62,7 +62,7 @@ add_executable(unit_tests
${unit_tests_sources}
${unit_tests_headers})
target_link_libraries(unit_tests
- LINK_PRIVATE
+ PRIVATE
ringct
cryptonote_core
blockchain_db
@@ -70,11 +70,7 @@ target_link_libraries(unit_tests
wallet
p2p
${GTEST_LIBRARIES}
- ${Boost_CHRONO_LIBRARY}
- ${Boost_REGEX_LIBRARY}
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- ${UNBOUND_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
set_property(TARGET unit_tests
PROPERTY