Skip to content

Commit

Permalink
[FIXUP] cmake: Enable tests before adding subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jun 28, 2024
1 parent 2cba852 commit 6e36a43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@ if(DEFINED ENV{LDFLAGS})
deduplicate_flags(CMAKE_EXE_LINKER_FLAGS)
endif()

if(BUILD_TESTS)
enable_testing()
endif()
set(CMAKE_SKIP_RPATH TRUE)
add_subdirectory(test)
add_subdirectory(doc)
Expand Down
2 changes: 0 additions & 2 deletions cmake/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.

include(CTest)

if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
add_test(NAME util_test_runner
COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${CMAKE_BINARY_DIR}/test/util/test_runner.py
Expand Down

0 comments on commit 6e36a43

Please sign in to comment.