]> git.pld-linux.org Git - packages/clapack.git/blob - clapack-3.2.1-findblas.patch
- rebuild with lapack 3.7
[packages/clapack.git] / clapack-3.2.1-findblas.patch
1 diff -ruN clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
2 --- clapack-3.2.1-CMAKE.orig/CMakeLists.txt     2011-06-17 23:01:05.275747599 +0200
3 +++ clapack-3.2.1-CMAKE/CMakeLists.txt  2011-06-17 23:07:49.128747755 +0200
4 @@ -30,6 +30,28 @@
5  
6  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
7  
8 +if(BLAS_LIBRARIES)
9 +  include(CheckFortranFunctionExists)
10 +  set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
11 +  CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND)
12 +  unset( CMAKE_REQUIRED_LIBRARIES )
13 +  if(BLAS_FOUND)
14 +    message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
15 +  else(BLAS_FOUND)
16 +    message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.")
17 +    message(ERROR "-->     Will use REFERENCE BLAS (by default)")
18 +    message(ERROR "-->     Or Correct your BLAS_LIBRARIES entry ")
19 +    message(ERROR "-->     Or Consider checking USE_OPTIMIZED_BLAS")
20 +  endif(BLAS_FOUND)
21 +else(BLAS_LIBRARIES)
22 +   # User did not provide a BLAS Library
23 +   find_package( BLAS )
24 +endif (BLAS_LIBRARIES)
25 +
26 +if(NOT BLAS_FOUND)
27 +    message(FATAL_ERROR "--> BLAS libraries needed but not found.")
28 +endif(NOT BLAS_FOUND)
29 +
30  add_subdirectory(SRC)
31  
32  if(ENABLE_TESTS)
33 @@ -44,4 +66,3 @@
34    ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
35  configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
36    ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
37 -
38 diff -ruN clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
39 --- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt 2011-06-17 23:01:05.276747599 +0200
40 +++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt      2011-06-17 23:08:43.761747789 +0200
41 @@ -377,7 +377,7 @@
42  endif()
43  
44  add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
45 -target_link_libraries(clapack blas f2c m)
46 +target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m)
47  set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
48  
49  install(
This page took 0.072205 seconds and 4 git commands to generate.