]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Remove SuiteSparse_config PIC test 4831/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 14 Aug 2017 04:46:31 +0000 (23:46 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 14 Aug 2017 04:46:31 +0000 (23:46 -0500)
This is a 5 year old workaround for a very old Debian distribution.
Unfortunately, we run into problems with this PIC test - so simply
remove it.

cmake/modules/FindUMFPACK.cmake

index bd26c93cdcbeebe86e0517a06b1db0f28efbd6e1..ff6c702381910e7cd970877692d62ab0faef889c 100644 (file)
@@ -118,24 +118,6 @@ FIND_UMFPACK_LIBRARY(CCOLAMD ccolamd)
 FIND_UMFPACK_LIBRARY(CAMD camd)
 FIND_UMFPACK_LIBRARY(SuiteSparse_config suitesparseconfig)
 
-#
-# Test whether libsuitesparseconfig.xxx can be used for shared library
-# linkage. If not, exclude it from the command line.
-#
-LIST(APPEND CMAKE_REQUIRED_LIBRARIES
-  "-shared"
-  ${SuiteSparse_config_LIBRARY}
-  )
-CHECK_CXX_SOURCE_COMPILES("extern int SuiteSparse_version (int[3]);
-  void foo(int bar[3]) { SuiteSparse_version(bar);}"
-  LAPACK_SUITESPARSECONFIG_WITH_PIC
-  )
-RESET_CMAKE_REQUIRED()
-
-IF(LAPACK_SUITESPARSECONFIG_WITH_PIC OR NOT BUILD_SHARED_LIBS)
-  SET(_suitesparse_config SuiteSparse_config_LIBRARY)
-ENDIF()
-
 #
 # Add rt to the link interface as well (for whatever reason,
 # libsuitesparse.so depends on clock_gettime but the shared
@@ -148,7 +130,7 @@ MARK_AS_ADVANCED(rt_LIBRARY)
 DEAL_II_PACKAGE_HANDLE(UMFPACK
   LIBRARIES
     REQUIRED UMFPACK_LIBRARY
-    OPTIONAL CHOLMOD_LIBRARY CCOLAMD_LIBRARY COLAMD_LIBRARY CAMD_LIBRARY ${_suitesparse_config}
+    OPTIONAL CHOLMOD_LIBRARY CCOLAMD_LIBRARY COLAMD_LIBRARY CAMD_LIBRARY SuiteSparse_config_LIBRARY
     REQUIRED AMD_LIBRARY
     OPTIONAL METIS_LIBRARIES LAPACK_LIBRARIES rt_LIBRARY
   INCLUDE_DIRS

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.