]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build: avoid Windows linking issues 45272/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 7 Mar 2022 08:20:03 +0000 (08:20 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 7 Mar 2022 08:31:14 +0000 (08:31 +0000)
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 <lpetrut@cloudbasesolutions.com>
src/CMakeLists.txt

index a538ee0ae872e1c66176a67da79ae6a6be548721..3867d6a4caafb7a4ddae2cc1b21bd6bb22011737 100644 (file)
@@ -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)