Skip to content

Commit 4c172c6

Browse files
committed
test: require GTest::gmock for app unit tests
1 parent 7489c96 commit 4c172c6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 3.22)
55
find_package(Qt 6.2 MODULE REQUIRED COMPONENTS Core Test Qml Quick QuickTest)
66
find_package(GTest REQUIRED)
77

8+
if(NOT TARGET GTest::gmock)
9+
message(FATAL_ERROR "GTest::gmock target is required for app unit tests. Ensure gmock is installed and exported by the active GTest package.")
10+
endif()
11+
812
add_executable(bitcoinqml_unit_tests
913
test_unit_tests_main.cpp
1014
test_bitcoinamount.cpp
@@ -37,7 +41,6 @@ target_include_directories(bitcoinqml_unit_tests
3741
target_link_libraries(bitcoinqml_unit_tests
3842
PRIVATE
3943
bitcoin_common
40-
GTest::gmock
4144
bitcoin_util
4245
GTest::gmock
4346
Qt6::Core

0 commit comments

Comments
 (0)