vcpkg/ports/gtest/usage

9 lines
277 B
Plaintext
Raw Normal View History

The package gtest is compatible with built-in CMake targets:
enable_testing()
2019-09-04 02:03:10 +08:00
find_package(GTest CONFIG REQUIRED)
target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main)
add_test(AllTestsInMain main)