summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2021-02-19 12:04:32 +0800
committersinguliere <singuliere@autistici.org>2021-03-07 23:10:02 +0100
commit53139eca6ebb7480402ceb941155895cda67fd85 (patch)
tree1c9de7d0385efce930fef45fdac4e6dce9c11e10
parent943a5082b9668ecda66345afdb61599e82d280b7 (diff)
downloadceph-53139eca6ebb7480402ceb941155895cda67fd85.tar.gz
cmake: build static libs if they are internal ones
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 introduced in pacific https://github.com/ceph/ceph/pull/34622/files
-rw-r--r--src/common/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 5e7fb6a78eb..7a880532170 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -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}")