# After running "cmake ." type "sudo make install" to install the headers.
# To compile the tests type "make" after you have installed the headers
# Note that the lapack library needs to be installed.

PROJECT(ulapack)

INSTALL_FILES(/include/ulapack/ .?\\.hpp\($|[\ ]\) )

OPTION( BUILD_TESTS "Building Tests" OFF )
IF (BUILD_TESTS)
  ADD_EXECUTABLE(test_lu test_lu.cpp)
  ADD_EXECUTABLE(test_cholesky test_cholesky.cpp)
  ADD_EXECUTABLE(test_eig test_eig.cpp)
  ADD_EXECUTABLE(test_svd test_svd.cpp)

  TARGET_LINK_LIBRARIES( test_lu lapack)
  TARGET_LINK_LIBRARIES( test_cholesky lapack)
  TARGET_LINK_LIBRARIES( test_eig lapack)
  TARGET_LINK_LIBRARIES( test_svd lapack)
ENDIF (BUILD_TESTS)

LINK_LIBRARIES(lapack blas g2c)

LINK_DIRECTORIES(/usr/lib/atlas )
