Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13114950
D1023.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D1023.diff
View Options
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -217,10 +217,25 @@
target_link_libraries(server ${EVENT_PTHREAD_LIBRARY})
endif()
+# Wallet
+if(BUILD_BITCOIN_WALLET)
+ add_subdirectory(wallet)
+ target_link_libraries(server wallet)
+endif()
+
+# ZeroMQ
+if(BUILD_BITCOIN_ZMQ)
+ add_subdirectory(zmq)
+ target_link_libraries(server zmq)
+endif()
+
# RPC client support
add_library(rpcclient rpc/client.cpp)
target_link_libraries(rpcclient univalue util)
+# Test suite.
+add_subdirectory(test)
+
# bitcoin-seeder
if(BUILD_BITCOIN_SEEDER)
add_subdirectory(seeder)
@@ -253,15 +268,3 @@
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
target_sources(bitcoind PRIVATE bitcoind-res.rc)
endif()
-
-# Wallet
-if(BUILD_BITCOIN_WALLET)
- add_subdirectory(wallet)
- target_link_libraries(bitcoind wallet)
-endif()
-
-# ZeroMQ
-if(BUILD_BITCOIN_ZMQ)
- add_subdirectory(zmq)
- target_link_libraries(bitcoind zmq)
-endif()
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/src/test/CMakeLists.txt
@@ -0,0 +1,82 @@
+# Copyright (c) 2018 The Bitcoin developers
+
+project(bitcoin-test)
+
+add_executable(test_bitcoin
+ arith_uint256_tests.cpp
+ addrman_tests.cpp
+ amount_tests.cpp
+ allocator_tests.cpp
+ base32_tests.cpp
+ # base58_tests.cpp
+ base64_tests.cpp
+ bip32_tests.cpp
+ blockcheck_tests.cpp
+ blockencodings_tests.cpp
+ bloom_tests.cpp
+ bswap_tests.cpp
+ cashaddr_tests.cpp
+ cashaddrenc_tests.cpp
+ coins_tests.cpp
+ compress_tests.cpp
+ config_tests.cpp
+ crypto_tests.cpp
+ cuckoocache_tests.cpp
+ DoS_tests.cpp
+ dstencode_tests.cpp
+ excessiveblock_tests.cpp
+ getarg_tests.cpp
+ hash_tests.cpp
+ inv_tests.cpp
+ key_tests.cpp
+ limitedmap_tests.cpp
+ dbwrapper_tests.cpp
+ main_tests.cpp
+ mempool_tests.cpp
+ merkle_tests.cpp
+ miner_tests.cpp
+ multisig_tests.cpp
+ net_tests.cpp
+ netbase_tests.cpp
+ pmt_tests.cpp
+ policyestimator_tests.cpp
+ pow_tests.cpp
+ prevector_tests.cpp
+ raii_event_tests.cpp
+ random_tests.cpp
+ reverselock_tests.cpp
+ rpc_tests.cpp
+ sanity_tests.cpp
+ # scheduler_tests.cpp
+ script_antireplay_tests.cpp
+ script_P2SH_tests.cpp
+ # script_tests.cpp
+ script_sighashtype_tests.cpp
+ scriptflags.cpp
+ scriptnum_tests.cpp
+ serialize_tests.cpp
+ # sighash_tests.cpp
+ sigopcount_tests.cpp
+ sigutil.cpp
+ skiplist_tests.cpp
+ streams_tests.cpp
+ test_bitcoin.cpp
+ test_bitcoin_main.cpp
+ testutil.cpp
+ timedata_tests.cpp
+ # transaction_tests.cpp
+ txvalidationcache_tests.cpp
+ versionbits_tests.cpp
+ uint256_tests.cpp
+ undo_tests.cpp
+ univalue_tests.cpp
+ util_tests.cpp
+ validation_tests.cpp
+)
+
+find_package(Boost 1.58 REQUIRED unit_test_framework)
+
+target_link_libraries(test_bitcoin Boost::unit_test_framework rpcclient server)
+
+# FIXME: We need to detect if that flag is required. For now assume it is.
+target_compile_definitions(test_bitcoin PRIVATE BOOST_TEST_DYN_LINK)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 08:50 (33 m, 30 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187132
Default Alt Text
D1023.diff (2 KB)
Attached To
D1023: Add support to build tests with cmake
Event Timeline
Log In to Comment