]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: should use the value of GPERFTOOLS_LIBRARIES as REQUIRED_VARS
authorKefu Chai <kchai@redhat.com>
Tue, 31 Oct 2017 08:58:02 +0000 (16:58 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 31 Oct 2017 08:58:04 +0000 (16:58 +0800)
otherwise it's always true, even if the libaries are not found. also
the cmake output will be wrong without this change:

without this change, it is:

-- Found gperftools: GPERFTOOLS_TCMALLOC_LIBRARY;GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY;GPERFTOOLS_PROFILER_LIBRARY (found version "2.5.93")

with this change, it would be:

-- Found gperftools: /tmp/gperf/lib/libtcmalloc.so (found version "2.5.93")

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Findgperftools.cmake

index 3d9b7e98c243c5d95e3c4d9f01c3752eaef81c9d..e9aa9bfb0034c0d68caed72e75c166e19b479e2c 100644 (file)
@@ -40,7 +40,7 @@ endforeach()
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(gperftools
-  REQUIRED_VARS GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR
+  REQUIRED_VARS ${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR
   VERSION_VAR TCMALLOC_VERSION_STRING)
 
-mark_as_advanced(GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR)
+mark_as_advanced(${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR)