]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: find pmem once instead twice
authorKefu Chai <kchai@redhat.com>
Sat, 3 Apr 2021 13:53:17 +0000 (21:53 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Apr 2021 09:33:09 +0000 (17:33 +0800)
less noise in cmake output

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

index db460978dd536053862f262ef65726d0338fd122..98db46226bd4ab27fb25782750280250c0e2b66c 100644 (file)
@@ -507,12 +507,14 @@ endif()
 
 if(WITH_BLUESTORE_PMEM OR WITH_RBD_RWL)
   if(WITH_SYSTEM_PMDK)
+    set(pmem_COMPONENTS)
     if(WITH_BLUESTORE_PMEM)
-      find_package(pmem 1.7 REQUIRED COMPONENTS pmem)
+      list(APPEND pmem_COMPONENTS pmem)
     endif()
     if(WITH_RBD_RWL)
-      find_package(pmem 1.7 REQUIRED COMPONENTS pmemobj)
+      list(APPEND pmem_COMPONENTS pmemobj)
     endif()
+    find_package(pmem 1.7 REQUIRED COMPONENTS ${pmem_COMPONENTS})
   else()
     include(Buildpmem)
     build_pmem()