Tested with cmake from ppa and `libgmock-dev` installed. Simple test project.
CMakeLists.txt ============== cmake_minimum_required(VERSION 3.16) project(CMake-gmock-test) include(CTest) find_package(GTest 1.10.0) add_executable(test_gmock_tgt main.cpp) target_link_libraries(test_gmock_tgt GTest::gtest GTest::gmock GTest::gmock_main) add_test(NAME test_gmock_tgt COMMAND test_gmock_tgt) ============== main.cpp ======== #include <gtest/gtest.h> #include <gmock/gmock.h> ======== would compile (and not complaing about missing targets) with commands: ``` cmake -S . -B build cmake --build build/ ctest --test-dir build ``` -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to cmake in Ubuntu. https://bugs.launchpad.net/bugs/1986665 Title: [SRU] CMake imported targets GTest::gmock and GTest::gmock_main are not available To manage notifications about this bug go to: https://bugs.launchpad.net/cmake/+bug/1986665/+subscriptions -- kubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
