File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ if(${BUILD_EXAMPLES})
9191endif ()
9292
9393# Tests --------------------------------------------------------------
94- # if(${BUILD_GTESTS})
95- # message(STATUS "building unix tests")
96- # add_subdirectory(test)
97- # endif()
94+ if (${BUILD_GTESTS} )
95+ message (STATUS "building unix tests" )
96+ add_subdirectory (test )
97+ endif ()
Original file line number Diff line number Diff line change @@ -2,17 +2,10 @@ include(FetchContent)
22
33# GTest -----------------
44FetchContent_Declare (gtest
5- GIT_REPOSITORY "https://github.com/google/googletest"
6- GIT_TAG "origin/main"
7- SOURCE_DIR "${CMAKE_BINARY_DIR} /gtest"
5+ GIT_REPOSITORY https://github.com/google/googletest.git
6+ GIT_TAG v1.15.2 # or another tag/branch
87)
9- # set(EXAMPLES OFF CACHE INTERNAL "Dont build examples")
108FetchContent_MakeAvailable (gtest)
11- if (gtest_POPULATED)
12- message (STATUS "=> Found gtest" )
13- else ()
14- message (STATUS "*** Didn't find gtest" )
15- endif ()
169
1710enable_testing ()
1811
You can’t perform that action at this time.
0 commit comments