mirror of
https://github.com/aristocratos/btop.git
synced 2025-12-23 22:29:08 -05:00
21 lines
544 B
CMake
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)
|