source: pacpussensors/trunk/Vislab/lib3dv/eigen/blas/CMakeLists.txt@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 1.5 KB
Line 
1
2project(EigenBlas CXX)
3
4include("../cmake/language_support.cmake")
5
6workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
7
8if(EIGEN_Fortran_COMPILER_WORKS)
9 enable_language(Fortran OPTIONAL)
10 if(NOT CMAKE_Fortran_COMPILER)
11 set(EIGEN_Fortran_COMPILER_WORKS OFF)
12 endif()
13endif()
14
15add_custom_target(blas)
16
17set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp)
18
19if(EIGEN_Fortran_COMPILER_WORKS)
20
21set(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)
30else()
31
32message(WARNING " No fortran compiler has been detected, the blas build will be incomplete.")
33
34endif()
35
36add_library(eigen_blas_static ${EigenBlas_SRCS})
37add_library(eigen_blas SHARED ${EigenBlas_SRCS})
38
39if(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})
42endif()
43
44add_dependencies(blas eigen_blas eigen_blas_static)
45
46install(TARGETS eigen_blas eigen_blas_static
47 RUNTIME DESTINATION bin
48 LIBRARY DESTINATION lib
49 ARCHIVE DESTINATION lib)
50
51if(EIGEN_Fortran_COMPILER_WORKS)
52
53if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
54 add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest
55else()
56 add_subdirectory(testing EXCLUDE_FROM_ALL)
57endif()
58
59endif()
60
Note: See TracBrowser for help on using the repository browser.