]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: include googletest instead of its subdirectory
authorKefu Chai <kchai@redhat.com>
Mon, 27 May 2019 07:09:25 +0000 (15:09 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 27 May 2019 07:18:00 +0000 (15:18 +0800)
so its own settings can be populated properly, among other things,
`GOOGLETEST_VERSION` is set in the CMakeLists.txt in its root directory.
without it, cmake complains when interpreting

project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt

index 654582f40e5cd02243dad30290ae2bc1475e9328..42ecb2bd0d24f969956617735105a1d22c9f9d01 100644 (file)
@@ -528,7 +528,7 @@ if(WITH_TESTS)
     find_package(GMock REQUIRED)
   else()
     set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
-    add_subdirectory(googletest/googlemock)
+    add_subdirectory(googletest)
     add_library(GMock::GMock ALIAS gmock)
     add_library(GMock::Main ALIAS gmock_main)
     target_include_directories(gmock INTERFACE