Skip to content

Instantly share code, notes, and snippets.

View johnb003's full-sized avatar

John Butterfield johnb003

View GitHub Profile
@johnb003
johnb003 / CMakeLists.txt
Last active April 13, 2024 09:03 — forked from ClintLiddick/External_GTest.cmake
CMake ExternalProject_Add for Google Mock (gmock) and Google Test (gtest) Libraries With Includes and Example Usage
# Assuming this your tests/CMakeLists.txt (and your libs are setup in a root config)
# Just make sure to include(CTest) in your *root* cmake config.
# 3.9 adds support for "GoogleTest" which enumerates the tests inside
# of the code and adds them to ctest.
cmake_minimum_required(VERSION 3.9)
# Configure google-test as a downloadable library.
include(External_GTest.cmake)