We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GoogleTest
1 parent ebe8eda commit 0672316Copy full SHA for 0672316
CMakeLists.txt
@@ -4,4 +4,21 @@ project(cplusplus)
4
set(CMAKE_CXX_STANDARD 17)
5
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6
7
+###
8
+# START - For setting up Google Test
9
+# Reference: https://google.github.io/googletest/quickstart-cmake.html#set-up-a-project
10
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
11
+
12
+include(FetchContent)
13
+FetchContent_Declare(
14
+ googletest
15
+ URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
16
+)
17
+# For Windows: Prevent overriding the parent project's compiler/linker settings
18
+set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
19
+FetchContent_MakeAvailable(googletest)
20
21
+# END - For setting up Google Test
22
23
24
add_executable(cplusplus main.cpp)
0 commit comments