2010-11-20 19:01:17 +08:00
|
|
|
|
|
|
|
project(EigenBlas CXX)
|
|
|
|
|
|
|
|
if((NOT DEFINED EIGEN_Fortran_COMPILER_WORKS) OR EIGEN_Fortran_COMPILER_WORKS)
|
|
|
|
|
|
|
|
enable_language(Fortran OPTIONAL)
|
|
|
|
|
|
|
|
if(CMAKE_Fortran_COMPILER_WORKS)
|
|
|
|
set(EIGEN_Fortran_COMPILER_WORKS TRUE CACHE INTERNAL "workaround cmake's enable_language issue")
|
|
|
|
else()
|
|
|
|
set(EIGEN_Fortran_COMPILER_WORKS FALSE CACHE INTERNAL "workaround cmake's enable_language issue")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
endif()
|
2009-10-03 00:45:24 +08:00
|
|
|
|
2009-09-28 05:48:53 +08:00
|
|
|
add_custom_target(blas)
|
2009-09-25 19:08:39 +08:00
|
|
|
|
2010-11-23 01:05:09 +08:00
|
|
|
set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp
|
|
|
|
srotm.f srotmg.f drotm.f drotmg.f
|
|
|
|
lsame.f cgbmv.f chpr2.f ctbsv.f dspmv.f dtbmv.f dtpsv.f ssbmv.f sspr.f stpmv.f zgbmv.f zhpr2.f ztbsv.f chbmv.f chpr.f ctpmv.f dgbmv.f dspr2.f dtbsv.f sspmv.f stbmv.f stpsv.f zhbmv.f zhpr.f ztpmv.f chpmv.f ctbmv.f ctpsv.f dsbmv.f dspr.f dtpmv.f sgbmv.f sspr2.f stbsv.f zhpmv.f ztbmv.f ztpsv.f
|
|
|
|
)
|
2009-09-25 19:08:39 +08:00
|
|
|
|
2010-03-25 02:34:18 +08:00
|
|
|
add_library(eigen_blas_static ${EigenBlas_SRCS})
|
|
|
|
add_library(eigen_blas SHARED ${EigenBlas_SRCS})
|
2010-04-19 23:19:22 +08:00
|
|
|
|
|
|
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
|
|
|
target_link_libraries(eigen_blas_static ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|
|
|
target_link_libraries(eigen_blas ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|
|
|
endif()
|
|
|
|
|
2010-03-25 02:34:18 +08:00
|
|
|
add_dependencies(blas eigen_blas eigen_blas_static)
|
2009-09-25 19:08:39 +08:00
|
|
|
|
|
|
|
install(TARGETS eigen_blas
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
|
2010-11-20 19:01:17 +08:00
|
|
|
|
|
|
|
if(CMAKE_Fortran_COMPILER_WORKS)
|
|
|
|
add_subdirectory(testing)
|
|
|
|
endif(CMAKE_Fortran_COMPILER_WORKS)
|