From: Marc Fehling Date: Sat, 30 Nov 2019 23:51:16 +0000 (+0100) Subject: Fixed cmake 3.16.0 incompatibility. X-Git-Tag: v9.2.0-rc1~823^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9117%2Fhead;p=dealii.git Fixed cmake 3.16.0 incompatibility. --- diff --git a/cmake/configure/configure_1_threads.cmake b/cmake/configure/configure_1_threads.cmake index b4de2cc2cc..b039497a13 100644 --- a/cmake/configure/configure_1_threads.cmake +++ b/cmake/configure/configure_1_threads.cmake @@ -38,6 +38,16 @@ MACRO(SETUP_THREADING) RESET_CMAKE_REQUIRED() + # + # The FindThreads macro returned a linker option instead of the actual + # library name in earlier versions. We still require the linker option, + # so we fix the corresponding variable. + # - See: https://gitlab.kitware.com/cmake/cmake/issues/19747 + # + IF(CMAKE_THREAD_LIBS_INIT AND NOT "${CMAKE_THREAD_LIBS_INIT}" MATCHES "^-l") + STRING(PREPEND CMAKE_THREAD_LIBS_INIT "-l") + ENDIF() + ELSE() #