From: Kefu Chai Date: Mon, 27 May 2019 07:09:25 +0000 (+0800) Subject: cmake: include googletest instead of its subdirectory X-Git-Tag: v15.1.0~2568^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=922aa71a6f5d01ff7e2486c58be18b44bd68c656;p=ceph.git cmake: include googletest instead of its subdirectory 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 --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 654582f40e5cd..42ecb2bd0d24f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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