]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfixes
authorMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 1 Apr 2013 08:17:30 +0000 (08:17 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 1 Apr 2013 08:17:30 +0000 (08:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@29132 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_1_lapack.cmake
deal.II/doc/development/cmake.html

index 301d1532ecc9c49b076996f736a05adb1cc0f973..9f42e5da4020f327a04deaba19d920e927ec4776 100644 (file)
@@ -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()
 
index 61b0a0256b0362c6c0ae6d9f390008fdcca435b5..debc969fc59dbfd541ef3a40beffe826b884c86d 100644 (file)
       In this case you can set by hand:
       <pre>
 
-    cmake -D&lt;lib&gt;_FOUND=true \
-          -D&lt;lib&gt;_LIBRARIES="library;and;complete;link;interface" \
-        ( -D&lt;lib&gt;_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
-          -D&lt;lib&gt;_LINKER_FLAGS="..." \
-          -D&lt;lib&gt;_&lt;...depending on library...&gt; )
+    cmake -D&lt;feature&gt;_FOUND=true \
+          -D&lt;feature&gt;_LIBRARIES="library;and;complete;link;interface" \
+        ( -D&lt;feature&gt;_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
+          -D&lt;feature&gt;_LINKER_FLAGS="..." \
+          -D&lt;feature&gt;_&lt;...depending on library...&gt; )
       </pre>
 
       The first define ensures that <code>cmake</code> does not
 
     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"
       </pre>
 
       You can set these values on the command line, with <code>ccmake</code>

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.