| Line | |
|---|
| 1 |
|
|---|
| 2 | project(EigenBlas CXX)
|
|---|
| 3 |
|
|---|
| 4 | include("../cmake/language_support.cmake")
|
|---|
| 5 |
|
|---|
| 6 | workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
|
|---|
| 7 |
|
|---|
| 8 | if(EIGEN_Fortran_COMPILER_WORKS)
|
|---|
| 9 | enable_language(Fortran OPTIONAL)
|
|---|
| 10 | if(NOT CMAKE_Fortran_COMPILER)
|
|---|
| 11 | set(EIGEN_Fortran_COMPILER_WORKS OFF)
|
|---|
| 12 | endif()
|
|---|
| 13 | endif()
|
|---|
| 14 |
|
|---|
| 15 | add_custom_target(blas)
|
|---|
| 16 |
|
|---|
| 17 | set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp)
|
|---|
| 18 |
|
|---|
| 19 | if(EIGEN_Fortran_COMPILER_WORKS)
|
|---|
| 20 |
|
|---|
| 21 | set(EigenBlas_SRCS ${EigenBlas_SRCS}
|
|---|
| 22 | complexdots.f
|
|---|
| 23 | srotm.f srotmg.f drotm.f drotmg.f
|
|---|
| 24 | lsame.f dspmv.f ssbmv.f
|
|---|
| 25 | chbmv.f sspmv.f
|
|---|
| 26 | zhbmv.f chpmv.f dsbmv.f
|
|---|
| 27 | zhpmv.f
|
|---|
| 28 | dtbmv.f stbmv.f ctbmv.f ztbmv.f
|
|---|
| 29 | )
|
|---|
| 30 | else()
|
|---|
| 31 |
|
|---|
| 32 | message(WARNING " No fortran compiler has been detected, the blas build will be incomplete.")
|
|---|
| 33 |
|
|---|
| 34 | endif()
|
|---|
| 35 |
|
|---|
| 36 | add_library(eigen_blas_static ${EigenBlas_SRCS})
|
|---|
| 37 | add_library(eigen_blas SHARED ${EigenBlas_SRCS})
|
|---|
| 38 |
|
|---|
| 39 | if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
|---|
| 40 | target_link_libraries(eigen_blas_static ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|---|
| 41 | target_link_libraries(eigen_blas ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|---|
| 42 | endif()
|
|---|
| 43 |
|
|---|
| 44 | add_dependencies(blas eigen_blas eigen_blas_static)
|
|---|
| 45 |
|
|---|
| 46 | install(TARGETS eigen_blas eigen_blas_static
|
|---|
| 47 | RUNTIME DESTINATION bin
|
|---|
| 48 | LIBRARY DESTINATION lib
|
|---|
| 49 | ARCHIVE DESTINATION lib)
|
|---|
| 50 |
|
|---|
| 51 | if(EIGEN_Fortran_COMPILER_WORKS)
|
|---|
| 52 |
|
|---|
| 53 | if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
|---|
| 54 | add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
|
|---|
| 55 | else()
|
|---|
| 56 | add_subdirectory(testing EXCLUDE_FROM_ALL)
|
|---|
| 57 | endif()
|
|---|
| 58 |
|
|---|
| 59 | endif()
|
|---|
| 60 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.