Skip to content

Commit

Permalink
build: avoid Windows linking issues
Browse files Browse the repository at this point in the history
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] 22fefb2

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
  • Loading branch information
petrutlucian94 committed Mar 7, 2022
1 parent 8b7432b commit c11455f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c11455f

Please sign in to comment.