Skip to content

Instantly share code, notes, and snippets.

@ptorre
ptorre / CMakeList.txt
Last active February 23, 2022 03:12
Configuring GoogleTest in CMakeList.txt (Building internally vs. using as installed on host).
###
# Compiler flags (not required for using GoogleTest)
#
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
##########
# Use ONE of the below sections to use GoogleTest.
# This example assumes that main_test.cc contains your tests.