2010-11-20 12:01:17 +01:00
|
|
|
|
|
|
|
|
project(EigenBlas CXX)
|
|
|
|
|
|
2010-11-24 22:26:13 +00:00
|
|
|
if( NOT DEFINED EIGEN_Fortran_COMPILER_WORKS OR EIGEN_Fortran_COMPILER_WORKS)
|
2010-11-20 12:01:17 +01:00
|
|
|
|
|
|
|
|
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-02 18:45:24 +02:00
|
|
|
|
2010-11-22 19:07:29 +01:00
|
|
|
if(CMAKE_Fortran_COMPILER_WORKS)
|
|
|
|
|
|
2009-09-27 17:48:53 -04:00
|
|
|
add_custom_target(blas)
|
2009-09-25 13:08:39 +02:00
|
|
|
|
2010-11-22 18:05:09 +01:00
|
|
|
set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp
|
2011-02-18 17:50:36 +01:00
|
|
|
complexdots.f
|
2010-11-22 18:05:09 +01:00
|
|
|
srotm.f srotmg.f drotm.f drotmg.f
|
2011-02-02 11:39:13 +01:00
|
|
|
lsame.f chpr2.f ctbsv.f dspmv.f dtbmv.f dtpsv.f ssbmv.f sspr.f stpmv.f zhpr2.f ztbsv.f chbmv.f chpr.f ctpmv.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 sspr2.f stbsv.f zhpmv.f ztbmv.f ztpsv.f
|
2010-11-22 18:05:09 +01:00
|
|
|
)
|
2009-09-25 13:08:39 +02:00
|
|
|
|
2010-03-24 19:34:18 +01:00
|
|
|
add_library(eigen_blas_static ${EigenBlas_SRCS})
|
|
|
|
|
add_library(eigen_blas SHARED ${EigenBlas_SRCS})
|
2010-04-19 11:19:22 -04: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-24 19:34:18 +01:00
|
|
|
add_dependencies(blas eigen_blas eigen_blas_static)
|
2009-09-25 13:08:39 +02:00
|
|
|
|
|
|
|
|
install(TARGETS eigen_blas
|
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
|
|
2010-11-20 12:01:17 +01:00
|
|
|
|
2010-12-12 13:10:00 +01:00
|
|
|
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
|
|
|
|
add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
|
|
|
|
else()
|
2011-02-17 15:33:35 +01:00
|
|
|
add_subdirectory(testing EXCLUDE_FROM_ALL)
|
2010-12-12 13:10:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
2010-11-20 12:01:17 +01:00
|
|
|
endif(CMAKE_Fortran_COMPILER_WORKS)
|