From: Lucian Petrut Date: Mon, 7 Mar 2022 08:20:03 +0000 (+0000) Subject: build: avoid Windows linking issues X-Git-Tag: v18.0.0~1273^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c11455fb4f28941f71ec0bf3fd9f293dc5d5c0cb;p=ceph.git build: avoid Windows linking issues A recent commit [1] changed the way in which libceph-common is built. Previously, it was always built statically but now it uses the "CEPH_SHARED" flag. Static Windows builds are now failing. For now, we'll just revert the previous behavior and always build libceph-common dinamically on Windows. [1] 22fefb2338cfc4fcb03ece3cbf77aa964a7f17f2 Signed-off-by: Lucian Petrut --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a538ee0ae872e..3867d6a4caafb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -526,7 +526,14 @@ add_library(common STATIC ${ceph_common_objs}) target_link_libraries(common ${ceph_common_deps}) add_dependencies(common legacy-option-headers ${jaeger_base}) -add_library(ceph-common ${CEPH_SHARED} ${ceph_common_objs}) +if (WIN32) + # Statically building ceph-common on Windows fails. We're temporarily + # reverting this: 22fefb2338cfc4fcb03ece3cbf77aa964a7f17f2 + add_library(ceph-common SHARED ${ceph_common_objs}) +else() + add_library(ceph-common ${CEPH_SHARED} ${ceph_common_objs}) +endif() + target_link_libraries(ceph-common ${ceph_common_deps}) if(ENABLE_COVERAGE) target_link_libraries(ceph-common gcov)