Files
cgal/Installation/cmake/modules/CGAL_UseLAPACK.cmake
T
Laurent Rineau c1fff72997 Revert that commit, which was wrong (see below):
| ------------------------------------------------------------------------
  | r65557 | lrineau | 2011-09-26 16:49:02 +0200 (Mon, 26 Sep 2011) | 9 lines
  | Changed paths:
  |    M /branches/next/Installation/cmake/modules/CGAL_UseBLAS.cmake
  |    M /branches/next/Installation/cmake/modules/CGAL_UseLAPACK.cmake
  |    M /branches/next/Installation/cmake/modules/FindBLAS.cmake
  |    M /branches/next/Installation/cmake/modules/FindLAPACK.cmake
  |    M /branches/next/Installation/doc_tex/Installation/installation.tex
  | 
  | BLAS and LAPACK do not have header files.
  | 
  | One implementation of BLAS or LAPACK can have a header file, but that is
  | not mandatory for an implementation, and (hopefully) nothing in CGAL tries
  | to include a blas.h or a lapack.h.
  | 
  | The current revision removes mentions of BLAS_INCLUDE_DIR and
  | LAPACK_INCLUDE_DIR in CGAL cmake scripts about BLAS and LAPACK.
  | 
  |
  ------------------------------------------------------------------------

Reason:

  For the implementation cblas/clapack, our use of that implementation does
  need a header <blaswrap.h> to work.
2011-10-13 10:17:16 +00:00

39 lines
1.2 KiB
CMake

# This module setups the compiler for the LAPACK libraries.
# It assumes that find_package(LAPACK) was already called.
if ( LAPACK_FOUND AND NOT CGAL_LAPACK_SETUP )
message( STATUS "LAPACK include: ${LAPACK_INCLUDE_DIR}" )
include_directories ( ${LAPACK_INCLUDE_DIR} )
message( STATUS "LAPACK definitions: ${LAPACK_DEFINITIONS}" )
add_definitions( ${LAPACK_DEFINITIONS} )
if ( "${LAPACK_DEFINITIONS}" MATCHES ".*LAPACK_USE_F2C.*" )
add_definitions( "-DCGAL_USE_F2C" )
endif()
if (LAPACK_LIBRARIES_DIR)
message( STATUS "LAPACK library directories: ${LAPACK_LIBRARIES_DIR}" )
link_directories( ${LAPACK_LIBRARIES_DIR} )
endif()
if (LAPACK_LIBRARIES)
message( STATUS "LAPACK libraries: ${LAPACK_LIBRARIES}" )
link_libraries( ${LAPACK_LIBRARIES} )
endif()
message( STATUS "LAPACK link flags: ${LAPACK_LINKER_FLAGS}" )
if ( BUILD_SHARED_LIBS )
uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS ${LAPACK_LINKER_FLAGS} )
else()
uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS ${LAPACK_LINKER_FLAGS} )
endif()
# LAPACK requires BLAS
include( ${BLAS_USE_FILE} )
# Setup is done
set ( CGAL_LAPACK_SETUP TRUE )
endif()