]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: build static libs if they are internal ones 40789/head
authorKefu Chai <kchai@redhat.com>
Fri, 19 Feb 2021 04:04:32 +0000 (12:04 +0800)
committerNathan Cutler <ncutler@suse.com>
Sun, 11 Apr 2021 10:09:07 +0000 (12:09 +0200)
there are chances that user or build script set `BUILD_SHARED_LIBS`,
so these convenience libraries (using the autotools' terminology)
are built and linked by never get installed.

Fixes: https://tracker.ceph.com/issues/38611
Fixes: https://tracker.ceph.com/issues/49080
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit df841b241efd387044d9637b1cf67d198bd1398e)

Conflicts:
src/blk/CMakeLists.txt
- code being changed does not exist in octopus

src/common/CMakeLists.txt

index 5e7fb6a78ebe8aa03d8f14a7c82d7e1dfa010b9d..7a8805321703a7295f1c97c8af3210dc6a65b9f8 100644 (file)
@@ -171,7 +171,7 @@ elseif(HAVE_ARMV8_CRC)
     crc32c_aarch64.c)
 endif(HAVE_INTEL)
 
-add_library(crc32 ${crc32_srcs})
+add_library(crc32 STATIC ${crc32_srcs})
 if(HAVE_ARMV8_CRC)
   set_target_properties(crc32 PROPERTIES
     COMPILE_FLAGS "${CMAKE_C_FLAGS} ${ARMV8_CRC_COMPILE_FLAGS}")