diff --git a/src/ipc/test/CMakeLists.txt b/src/ipc/test/CMakeLists.txt new file mode 100644 index 00000000000..a9bb02f59e0 --- /dev/null +++ b/src/ipc/test/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +target_link_libraries(bitcoin_ipc_test + PRIVATE + core_interface + univalue + Boost::headers +) + +# Do not use generator expressions in test sources because the +# SOURCES property is processed to gather test suite macros. +target_sources(test_bitcoin + PRIVATE + ipc_tests.cpp +) + +target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc) diff --git a/src/test/ipc_tests.cpp b/src/ipc/test/ipc_tests.cpp similarity index 100% rename from src/test/ipc_tests.cpp rename to src/ipc/test/ipc_tests.cpp diff --git a/src/test/.clang-tidy.in b/src/test/.clang-tidy.in deleted file mode 100644 index 92d24f6f660..00000000000 --- a/src/test/.clang-tidy.in +++ /dev/null @@ -1,3 +0,0 @@ -Checks: - # See: https://github.com/capnproto/capnproto/pull/2417. - - "-clang-analyzer-security.ArrayBound" diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index a67cd241764..4e8f7e91971 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -168,20 +168,7 @@ if(ENABLE_WALLET) endif() if(ENABLE_IPC) - target_link_libraries(bitcoin_ipc_test - PRIVATE - core_interface - univalue - Boost::headers - ) - - target_sources(test_bitcoin - PRIVATE - ipc_tests.cpp - ) - target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc) - - configure_file(.clang-tidy.in .clang-tidy USE_SOURCE_PERMISSIONS COPYONLY) + add_subdirectory(${PROJECT_SOURCE_DIR}/src/ipc/test ipc) endif() function(add_boost_test source_file)