Files
cpp-project-template/third_party/prometheus/cmake/googlemock-3rdparty-config.cmake
tqcq c68893bace
Some checks failed
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Failing after 29s
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Failing after 16s
sm-rpc / build (Debug, host.gcc) (push) Failing after 11s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Failing after 12s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Failing after 11s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Failing after 11s
sm-rpc / build (Release, host.gcc) (push) Failing after 12s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Failing after 16s
feat add spdlog
2025-08-22 18:22:57 +08:00

30 lines
759 B
CMake

get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../3rdparty/googletest/" ABSOLUTE)
find_package(Threads QUIET)
add_library(gmock_main STATIC EXCLUDE_FROM_ALL
${_IMPORT_PREFIX}/googletest/src/gtest-all.cc
${_IMPORT_PREFIX}/googlemock/src/gmock-all.cc
${_IMPORT_PREFIX}/googlemock/src/gmock_main.cc
)
target_include_directories(gmock_main SYSTEM
PUBLIC
${_IMPORT_PREFIX}/googletest/include
${_IMPORT_PREFIX}/googlemock/include
PRIVATE
${_IMPORT_PREFIX}/googletest
${_IMPORT_PREFIX}/googlemock
)
target_link_libraries(gmock_main
PRIVATE
Threads::Threads
)
add_library(GTest::gmock_main ALIAS gmock_main)
set_target_properties(gmock_main PROPERTIES
C_INCLUDE_WHAT_YOU_USE ""
CXX_INCLUDE_WHAT_YOU_USE ""
)