2010-11-20 19:01:17 +08:00
|
|
|
|
|
|
|
project(EigenBlas CXX)
|
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
include("../cmake/language_support.cmake")
|
2010-11-20 19:01:17 +08:00
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
|
2010-11-20 19:01:17 +08:00
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
if(EIGEN_Fortran_COMPILER_WORKS)
|
|
|
|
enable_language(Fortran OPTIONAL)
|
2014-02-13 16:21:13 +08:00
|
|
|
if(NOT CMAKE_Fortran_COMPILER)
|
|
|
|
set(EIGEN_Fortran_COMPILER_WORKS OFF)
|
|
|
|
endif()
|
2010-11-20 19:01:17 +08:00
|
|
|
endif()
|
2009-10-03 00:45:24 +08:00
|
|
|
|
2011-09-21 16:27:38 +08:00
|
|
|
add_custom_target(blas)
|
|
|
|
|
|
|
|
set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp)
|
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
if(EIGEN_Fortran_COMPILER_WORKS)
|
2009-09-25 19:08:39 +08:00
|
|
|
|
2011-09-21 16:27:38 +08:00
|
|
|
set(EigenBlas_SRCS ${EigenBlas_SRCS}
|
2011-02-19 00:50:36 +08:00
|
|
|
complexdots.f
|
2010-11-23 01:05:09 +08:00
|
|
|
srotm.f srotmg.f drotm.f drotmg.f
|
2012-09-10 18:25:30 +08:00
|
|
|
lsame.f dspmv.f ssbmv.f
|
|
|
|
chbmv.f sspmv.f
|
|
|
|
zhbmv.f chpmv.f dsbmv.f
|
2012-09-10 06:29:02 +08:00
|
|
|
zhpmv.f
|
2011-12-02 01:06:28 +08:00
|
|
|
dtbmv.f stbmv.f ctbmv.f ztbmv.f
|
2010-11-23 01:05:09 +08:00
|
|
|
)
|
2011-10-24 19:36:49 +08:00
|
|
|
else()
|
|
|
|
|
|
|
|
message(WARNING " No fortran compiler has been detected, the blas build will be incomplete.")
|
2009-09-25 19:08:39 +08:00
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
endif()
|
2011-09-21 16:27:38 +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
|
|
|
|
2011-07-11 23:02:09 +08:00
|
|
|
install(TARGETS eigen_blas eigen_blas_static
|
2009-09-25 19:08:39 +08:00
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
|
2011-10-24 19:36:49 +08:00
|
|
|
if(EIGEN_Fortran_COMPILER_WORKS)
|
2010-11-20 19:01:17 +08:00
|
|
|
|
2010-12-12 20:10:00 +08:00
|
|
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
|
|
|
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
|
|
|
else()
|
2011-02-17 22:33:35 +08:00
|
|
|
add_subdirectory(testing EXCLUDE_FROM_ALL)
|
2010-12-12 20:10:00 +08:00
|
|
|
endif()
|
|
|
|
|
2011-09-21 16:27:38 +08:00
|
|
|
endif()
|
|
|
|
|