]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: do not create gtest/gmock shared libraries 9477/head
authorKefu Chai <kchai@redhat.com>
Fri, 3 Jun 2016 03:53:10 +0000 (11:53 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 3 Jun 2016 17:42:09 +0000 (01:42 +0800)
otherwise unit tests crash at exit.

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

index 682b5b19f4c28c966cc1ecdf9b4e6b323116d999..7dda69460fccc163027e6705f1a53d9a92dd72d9 100644 (file)
@@ -996,7 +996,12 @@ target_link_libraries(crushtool global)
 install(TARGETS crushtool DESTINATION bin)
 
 # Support/Tools
+# the static gtest/gmock libraries load correctly for us
+set(BUILD_SHARED_LIBS_saved ${BUILD_SHARED_LIBS})
+set(BUILD_SHARED_LIBS OFF)
 add_subdirectory(gmock)
+set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_saved})
+
 add_subdirectory(test)
 set(cephfs_srcs cephfs.cc)
 add_executable(cephfstool ${cephfs_srcs})