Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 868acdf

Browse files
committedApr 17, 2025·
use BUILD_TESTING in cmake
1 parent 985bdc6 commit 868acdf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
99
option(BTCPP_SHARED_LIBS "Build shared libraries" ON)
1010
option(BTCPP_BUILD_TOOLS "Build commandline tools" ON)
1111
option(BTCPP_EXAMPLES "Build tutorials and examples" ON)
12-
option(BTCPP_UNIT_TESTS "Build the unit tests" ON)
12+
option(BUILD_TESTING "Build the unit tests" ON)
1313
option(BTCPP_GROOT_INTERFACE "Add Groot2 connection. Requires ZeroMQ" ON)
1414
option(BTCPP_SQLITE_LOGGING "Add SQLite logging." ON)
1515

@@ -220,15 +220,16 @@ endif()
220220
#############################################################
221221
message( STATUS "BTCPP_LIB_DESTINATION: ${BTCPP_LIB_DESTINATION} " )
222222
message( STATUS "BTCPP_INCLUDE_DESTINATION: ${BTCPP_INCLUDE_DESTINATION} " )
223-
message( STATUS "BTCPP_UNIT_TESTS: ${BTCPP_UNIT_TESTS} " )
224223

225-
if (BTCPP_UNIT_TESTS OR BTCPP_EXAMPLES)
224+
if (BUILD_TESTING OR BTCPP_EXAMPLES)
226225
add_subdirectory(sample_nodes)
227226
endif()
228227

229228
######################################################
230229

231-
if (BTCPP_UNIT_TESTS)
230+
include(CTest)
231+
message( STATUS "BUILD_TESTING: ${BUILD_TESTING} " )
232+
if (BUILD_TESTING)
232233
add_subdirectory(tests)
233234
endif()
234235

0 commit comments

Comments
 (0)
Please sign in to comment.