From: maier Date: Mon, 1 Apr 2013 08:17:30 +0000 (+0000) Subject: CMake: Bugfixes X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=157912ee7e4cf260b15959578acaee6d07bcb668;p=dealii-svn.git CMake: Bugfixes git-svn-id: https://svn.dealii.org/trunk@29132 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_1_lapack.cmake b/deal.II/cmake/configure/configure_1_lapack.cmake index 301d1532ec..9f42e5da40 100644 --- a/deal.II/cmake/configure/configure_1_lapack.cmake +++ b/deal.II/cmake/configure/configure_1_lapack.cmake @@ -69,19 +69,28 @@ ENDMACRO() MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL) - ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}") - LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES}) - # # So, well... LAPACK_LINKER_FLAGS and LAPACK_LIBRARIES should contain the # complete link interface. But for invalid user overrides we include # BLAS_LIBRARIES and BLAS_LINKER_FLAGS as well.. # - LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${BLAS_LIBRARIES}) IF(NOT LAPACK_LINKER_FLAGS MATCHES "${BLAS_LINKER_FLAGS}") - ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${BLAS_LINKER_FLAGS}") + MESSAGE(STATUS + "Manually adding BLAS_LINKER_FLAGS to LAPACK_LINKER_FLAGS" + ) + ADD_FLAGS(LAPACK_LINKER_FLAGS "${BLAS_LINKER_FLAGS}") + ENDIF() + IF(NOT "${LAPACK_LIBRARIES}" MATCHES "${BLAS_LIBRARIES}") + MESSAGE(STATUS + "Manually adding BLAS_LIBRARIES to LAPACK_LIBRARIES" + ) + LIST(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES}) ENDIF() + ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}") + LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES}) + + CHECK_FOR_LAPACK_FUNCTIONS() ENDMACRO() diff --git a/deal.II/doc/development/cmake.html b/deal.II/doc/development/cmake.html index 61b0a0256b..debc969fc5 100644 --- a/deal.II/doc/development/cmake.html +++ b/deal.II/doc/development/cmake.html @@ -396,11 +396,11 @@ In this case you can set by hand:
 
-    cmake -D<lib>_FOUND=true \
-          -D<lib>_LIBRARIES="library;and;complete;link;interface" \
-        ( -D<lib>_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
-          -D<lib>_LINKER_FLAGS="..." \
-          -D<lib>_<...depending on library...> )
+    cmake -D<feature>_FOUND=true \
+          -D<feature>_LIBRARIES="library;and;complete;link;interface" \
+        ( -D<feature>_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
+          -D<feature>_LINKER_FLAGS="..." \
+          -D<feature>_<...depending on library...> )
       
The first define ensures that cmake does not @@ -419,7 +419,7 @@ cmake -DLAPACK_FOUND=true \ -DLAPACK_LIBRARIES="/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libflapack.a;/tmp/petsc-3.3-p6/arch-linux2-c-debug/lib/libfblas.a" \ - -DLAPACK_LINKER_FLAGS="-lgfortran" + -DLAPACK_LINKER_FLAGS="-lgfortran -lm" You can set these values on the command line, with ccmake