mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 20:39:02 +08:00
12 lines
359 B
Plaintext
12 lines
359 B
Plaintext
The package gtest is compatible with built-in CMake targets:
|
|
|
|
enable_testing()
|
|
|
|
find_package(GTest MODULE REQUIRED)
|
|
target_link_libraries(main PRIVATE GTest::GTest GTest::Main)
|
|
|
|
find_package(GMock CONFIG REQUIRED)
|
|
target_link_libraries(main PRIVATE GMock::gmock GMock::gmock_main)
|
|
|
|
add_test(AllTestsInMain main)
|