Files
btop/tests/CMakeLists.txt
2025-12-04 21:33:57 +01:00

21 lines
544 B
CMake

# SPDX-License-Identifier: Apache-2.0
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.17.0
FIND_PACKAGE_ARGS NAMES GTest
)
FetchContent_MakeAvailable(googletest)
add_library(libbtop_test)
target_include_directories(libbtop_test PUBLIC ${PROJECT_SOURCE_DIR}/src)
target_link_libraries(libbtop_test libbtop GTest::gtest_main)
add_executable(btop_test tools.cpp)
target_link_libraries(btop_test libbtop_test)
include(GoogleTest)
gtest_discover_tests(btop_test)