You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

  1. project(EigenBlas CXX)
  2. include("../cmake/language_support.cmake")
  3. workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
  4. if(EIGEN_Fortran_COMPILER_WORKS)
  5. enable_language(Fortran OPTIONAL)
  6. endif()
  7. add_custom_target(blas)
  8. set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp)
  9. if(EIGEN_Fortran_COMPILER_WORKS)
  10. set(EigenBlas_SRCS ${EigenBlas_SRCS}
  11. complexdots.f
  12. srotm.f srotmg.f drotm.f drotmg.f
  13. lsame.f dspmv.f ssbmv.f
  14. chbmv.f sspmv.f
  15. zhbmv.f chpmv.f dsbmv.f
  16. zhpmv.f
  17. dtbmv.f stbmv.f ctbmv.f ztbmv.f
  18. )
  19. else()
  20. message(WARNING " No fortran compiler has been detected, the blas build will be incomplete.")
  21. endif()
  22. add_library(eigen_blas_static ${EigenBlas_SRCS})
  23. add_library(eigen_blas SHARED ${EigenBlas_SRCS})
  24. if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
  25. target_link_libraries(eigen_blas_static ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
  26. target_link_libraries(eigen_blas ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
  27. endif()
  28. add_dependencies(blas eigen_blas eigen_blas_static)
  29. install(TARGETS eigen_blas eigen_blas_static
  30. RUNTIME DESTINATION bin
  31. LIBRARY DESTINATION lib
  32. ARCHIVE DESTINATION lib)
  33. if(EIGEN_Fortran_COMPILER_WORKS)
  34. if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
  35. add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
  36. else()
  37. add_subdirectory(testing EXCLUDE_FROM_ALL)
  38. endif()
  39. endif()