summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorLucian Petrut <lpetrut@cloudbasesolutions.com>2023-08-23 16:21:12 +0200
committerLucian Petrut <lpetrut@cloudbasesolutions.com>2023-08-30 14:59:00 +0200
commitec4a2778f6c6a60763049e37a9cfa48fba31b404 (patch)
treef2c3ca9041e5705ffe1ed33df23ae76ef212d767 /src/CMakeLists.txt
parentcommon: skip boost shared_mutex with mingw-llvm (diff)
downloadceph-ec4a2778f6c6a60763049e37a9cfa48fba31b404.tar.xz
ceph-ec4a2778f6c6a60763049e37a9cfa48fba31b404.zip
cmake: fix mingw-llvm shared linking
mingw-llvm can't handle the '--exclude-libs' linker flag, so we'll have to skip it. At the same time, cmake can't locate the boost shared libs as the import libs are not generated when using mingw-llvm due to boost's clang-linux.jam file. For now, we'll patch the cmake files, using the dlls as import libs (which is allowed by mingw). While at it, we'll avoid linking the static AND dynamic boost libs, speeding the build. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8287539a3fc..c09d275f337 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -814,7 +814,8 @@ if(WITH_LIBCEPHFS)
OUTPUT_NAME cephfs
VERSION 2.0.0
SOVERSION 2)
- if(NOT APPLE)
+ if(NOT APPLE AND NOT
+ (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL Clang))
foreach(name ceph-common client osdc)
set_property(TARGET cephfs APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--exclude-libs,lib${name}.a")