]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: set empty CMAKE_DL_LIBS on MinGW
authorKen Dreyer <kdreyer@redhat.com>
Tue, 13 Sep 2022 17:34:35 +0000 (13:34 -0400)
committerKen Dreyer <kdreyer@redhat.com>
Tue, 27 Sep 2022 15:21:18 +0000 (11:21 -0400)
Upstream CMake sets CMAKE_DL_LIBS to an empty value on MINGW, but the
Fedora and RHEL packages override this and set "dl". Re-set it back to
an empty value.

We can revert this if https://bugzilla.redhat.com/2127529 is resolved
for CMake in Fedora and RHEL.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
src/CMakeLists.txt

index 549b18bcfdf05e63ac03e8145d90e231d154c95f..8d6add4666b1e07101f2eca3531316faef72a20b 100644 (file)
@@ -249,6 +249,12 @@ if(COMPILER_SUPPORTS_DIAGNOSTICS_COLOR)
     "$<$<COMPILE_LANGUAGE:CXX>:-fdiagnostics-color=${DIAGNOSTICS_COLOR}>")
 endif()
 
+if(MINGW)
+  # Fedora and RHEL set CMAKE_DL_LIBS on MINGW, which we must un-set here.
+  # Details at https://bugzilla.redhat.com/show_bug.cgi?id=2127529
+  set(CMAKE_DL_LIBS "")
+endif()
+
 set(EXTRALIBS ${CMAKE_DL_LIBS})
 if(HAVE_POSIX_TIMERS)
   list(APPEND EXTRALIBS ${RT_LIBRARY})