Hi Victor,

Would you mind testing something for me quickly?

We have a bit of code floating around in

  ./cmake/configure/configure_1_threads.cmake

that might create an issue (depending on icc and cmake version I guess).
Would you mind modifying the file as in the attached diff output? Simply
copy the patch file into the source directory of deal.II and run

  $ patch -p1 < remove_pthread_workarounds.patch

If that doesn't help, then my next request would be to see the full
terminal output of the cmake invocation.

Also, it seems that cmake barfs at the final sanity check where we check
whether we can compile a simply hello world program with our final
compile configuration. You can disable this check temporarily by
applying remove_sanity_checks.patch (that removes the corresponding
check from cmake./setup_finalize.cmake). cmake should then run through
without a problem creating a file 'detailed.log'. I would like to see
this one. (You can try to compile the library from here - but either the
final link of the library or linking any program against the library
will likely fail).

Best,
Matthias

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/87imhrchxw.fsf%4043-1.org.
diff --git a/cmake/configure/configure_1_threads.cmake b/cmake/configure/configure_1_threads.cmake
index dea761738a..e8b4be0818 100644
--- a/cmake/configure/configure_1_threads.cmake
+++ b/cmake/configure/configure_1_threads.cmake
@@ -38,15 +38,7 @@ 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()
+    MESSAGE(STATUS "CMAKE_THREAD_LIBS_INIT: ${CMAKE_THREAD_LIBS_INIT}")
 
   ELSE()
 
@@ -74,21 +66,6 @@ MACRO(SETUP_THREADING)
 
   MARK_AS_ADVANCED(pthread_LIBRARY)
 
-  #
-  # Change -lphtread to -pthread for better compatibility on non linux
-  # platforms:
-  #
-  IF("${CMAKE_THREAD_LIBS_INIT}" MATCHES "-lpthread")
-    CHECK_CXX_COMPILER_FLAG("-pthread"
-      DEAL_II_HAVE_FLAG_pthread
-      )
-    IF(DEAL_II_HAVE_FLAG_pthread)
-      STRING(REPLACE "-lpthread" "-pthread" CMAKE_THREAD_LIBS_INIT
-        "${CMAKE_THREAD_LIBS_INIT}"
-        )
-    ENDIF()
-  ENDIF()
-
   ADD_FLAGS(THREADS_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
 
   #
diff --git a/cmake/setup_finalize.cmake b/cmake/setup_finalize.cmake
index 515d999157..51b929695c 100644
--- a/cmake/setup_finalize.cmake
+++ b/cmake/setup_finalize.cmake
@@ -79,72 +79,6 @@ FOREACH(_suffix ${DEAL_II_LIST_SUFFIXES})
   ENDIF()
 ENDFOREACH()
 
-#
-# Sanity check: Can we compile with the final setup?
-#
-
-FOREACH(build ${DEAL_II_BUILD_TYPES})
-
-  MACRO(_check_linker_flags)
-    CHECK_COMPILER_SETUP(
-      "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}"
-      "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}"
-      DEAL_II_HAVE_USABLE_FLAGS_${build}
-      ${DEAL_II_LIBRARIES} ${DEAL_II_LIBRARIES_${build}}
-      )
-  ENDMACRO()
-
-  MACRO(_drop_linker_flag _linker_flag _replacement_flag _variable)
-    MESSAGE(STATUS
-      "Unable to compile a simple test program. "
-      "Trying to drop \"${_linker_flag}\" from the linker flags."
-      )
-    FOREACH(_flags
-        DEAL_II_LINKER_FLAGS DEAL_II_LINKER_FLAGS_${build}
-        BASE_LINKER_FLAGS BASE_LINKER_FLAGS_${build}
-        )
-      STRING(REPLACE "${_linker_flag}" "${_replacement_flag}"
-        ${_flags} "${${_flags}}"
-        )
-    ENDFOREACH()
-    SET(${_variable} FALSE CACHE INTERNAL "" FORCE)
-    SET(${_variable} FALSE)
-  ENDMACRO()
-
-  _check_linker_flags()
-
-  IF(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
-    SET(_replacement "")
-    IF(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-      SET(_replacement "-fuse-ld=gold")
-    ENDIF()
-    _drop_linker_flag(
-      "-fuse-ld=lld" ${_replacement}
-      DEAL_II_COMPILER_HAS_FUSE_LD_LLD
-      )
-    _check_linker_flags()
-  ENDIF()
-
-  IF(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
-    _drop_linker_flag(
-      "-fuse-ld=gold" ""
-      DEAL_II_COMPILER_HAS_FUSE_LD_GOLD
-      )
-    _check_linker_flags()
-  ENDIF()
-
-  IF(NOT DEAL_II_HAVE_USABLE_FLAGS_${build})
-    MESSAGE(FATAL_ERROR "
-  Configuration error: Cannot compile a test program with the final set of
-  compiler and linker flags:
-    CXX flags (${build}): ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}
-    LD flags  (${build}): ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}
-    LIBRARIES (${build}): ${DEAL_II_LIBRARIES};${DEAL_II_LIBRARIES_${build}}
-  \n\n"
-      )
-  ENDIF()
-ENDFOREACH()
-
 #
 # Clean up deal.IITargets.cmake in the build directory:
 #

Reply via email to