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()
In this case you can set by hand:
<pre>
- 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...> )
</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>