]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Fix a configuration error on Debian Testing wrt. libSuiteSparse_config.a
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 18:57:07 +0000 (18:57 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 18:57:07 +0000 (18:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@32403 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindDEALII_LAPACK.cmake
deal.II/cmake/modules/FindUMFPACK.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/doc/news/changes.h

index 4257ab332d58b69bc7d2632fbab93b6b2bf83daa..b16cf25b137de1a19cb884de7abad7686b1a3a14 100644 (file)
@@ -50,18 +50,9 @@ FIND_PACKAGE(LAPACK)
 SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})
 
 MARK_AS_ADVANCED(
-  atlas_LIBRARY
-  atlcblas_LIBRARY
-  atllapack_LIBRARY
-  blas_LIBRARY
-  eigen_blas_LIBRARY
-  f77blas_LIBRARY
-  gslcblas_LIBRARY
-  lapack_LIBRARY
-  m_LIBRARY
-  ptf77blas_LIBRARY
-  ptlapack_LIBRARY
-  refblas_LIBRARY
+  atlas_LIBRARY atlcblas_LIBRARY atllapack_LIBRARY blas_LIBRARY
+  eigen_blas_LIBRARY f77blas_LIBRARY gslcblas_LIBRARY lapack_LIBRARY
+  m_LIBRARY ptf77blas_LIBRARY ptlapack_LIBRARY refblas_LIBRARY
   reflapack_LIBRARY
   )
 
index 7594366b1e39cd9eae0f3e3ff1bc366576ba23fa..f3f5ac5657a86e7df8777b71d0d6f8a23f71c234 100644 (file)
@@ -105,6 +105,21 @@ 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}
+  )
+SET(CMAKE_REQUIRED_FLAGS ${DEAL_II_CXX_FLAGS})
+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(EXISTS ${UMFPACK_INCLUDE_DIR}/umfpack.h)
   FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_MAJOR_STRING
     REGEX "#define.*UMFPACK_MAIN_VERSION")
@@ -161,8 +176,10 @@ IF(UMFPACK_FOUND)
     ${COLAMD_LIBRARY}
     ${CAMD_LIBRARY}
     ${AMD_LIBRARY}
-    ${SuiteSparse_config_LIBRARY}
     )
+  IF(LAPACK_SUITESPARSECONFIG_WITH_PIC OR NOT BUILD_SHARED_LIBS)
+    LIST(APPEND UMFPACK_LIBRARIES ${SuiteSparse_config_LIBRARY})
+  ENDIF()
 
   #
   # For good measure:
index 1bf76c12e8f9423ec4dd456f37a8aa12d9be3225..22e0d65c08dc0b4db41a7089cbcde1a8cb283857 100644 (file)
@@ -38,7 +38,7 @@ ENDFOREACH()
 
 #
 # Sanity check: The variables defined in DEAL_II_REMOVED_FLAGS must not be
-# used during the comfiguration stage:
+# used during the configuration stage:
 #
 FOREACH(_flag ${DEAL_II_REMOVED_FLAGS})
   IF(NOT "${_flag}" STREQUAL "")
@@ -112,7 +112,6 @@ ENDFOREACH()
 #
 # Cleanup deal.IITargets.cmake in the build directory:
 #
-FILE(WRITE
+FILE(REMOVE
   ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
-  ""
   )
index 6aba67d558c0fbcef007598c3313d3357a7bde14..c99951908f2e10ec086c988891594066a0703786 100644 (file)
@@ -124,6 +124,12 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li>Fixed: A configuration error on Debian Testing where accidentally a
+  non-pic libSuiteSparse_config.a was picked up when building a shared
+  library up resulting in a link error.
+  <br>
+  (Matthias Maier, 2014/02/04)
+
   <li> Changed: GridTools::transform() can now deal with meshes with hanging nodes.
   <br>
   (Timo Heister, 2014/02/04)

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.