File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.11.0)
2+
3+ include (FetchContent)
4+ FetchContent_Declare(
5+ googletest
6+ GIT_REPOSITORY https://github.com/google/googletest.git
7+ GIT_TAG release-1.8.0
8+ )
9+ FetchContent_MakeAvailable(googletest)
10+ FetchContent_GetProperties(googletest)
11+ if (NOT googletest_POPULATED)
12+ FetchContent_Populate(googletest)
13+ add_subdirectory (${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} )
14+ endif ()
15+
Original file line number Diff line number Diff line change @@ -3,18 +3,7 @@ cmake_minimum_required(VERSION 3.11.0)
33set (CMAKE_CXX_STANDARD 17)
44project (cpp11training)
55
6- include (FetchContent)
7- FetchContent_Declare(
8- googletest
9- GIT_REPOSITORY https://github.com/google/googletest.git
10- GIT_TAG release-1.8.0
11- )
12- FetchContent_MakeAvailable(googletest)
13- FetchContent_GetProperties(googletest)
14- if (NOT googletest_POPULATED)
15- FetchContent_Populate(googletest)
16- add_subdirectory (${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} )
17- endif ()
6+ include (AddGoogleTest.cmake)
187
198project (cpp11training)
209file (GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR} /*.cpp" )
You can’t perform that action at this time.
0 commit comments