aboutsummaryrefslogtreecommitdiff
path: root/libraries/lapack/patches/link-dependencies.diff
blob: 31a2bcc6424f2c6042e6f1692221a652a769d787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt
--- a/BLAS/SRC/CMakeLists.txt
+++ b/BLAS/SRC/CMakeLists.txt
@@ -137,13 +137,9 @@
   
   
 add_library(blas ${ALLOBJ})
-#if(UNIX)
-#  target_link_libraries(blas m)
-#endif()
 set_target_properties(
   blas PROPERTIES
   VERSION ${LAPACK_VERSION}
   SOVERSION ${LAPACK_MAJOR_VERSION}
   )
-target_link_libraries(blas)
 lapack_install_library(blas)
diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in
--- a/BLAS/blas.pc.in
+++ b/BLAS/blas.pc.in
@@ -6,4 +6,3 @@
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/blas/
 Libs: -L${libdir} -lblas
-Libs.private: -lm
diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in
--- a/CBLAS/cblas.pc.in
+++ b/CBLAS/cblas.pc.in
@@ -6,4 +6,4 @@
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/blas/#_cblas
 Libs: -L${libdir} -lcblas
-Requires: blas
+Requires.private: blas
diff --git a/CBLAS/examples/CMakeLists.txt b/CBLAS/examples/CMakeLists.txt
--- a/CBLAS/examples/CMakeLists.txt
+++ b/CBLAS/examples/CMakeLists.txt
@@ -1,8 +1,8 @@
 add_executable(xexample1_CBLAS cblas_example1.c )
 add_executable(xexample2_CBLAS cblas_example2.c )
 
-target_link_libraries(xexample1_CBLAS cblas ${BLAS_LIBRARIES})
-target_link_libraries(xexample2_CBLAS cblas ${BLAS_LIBRARIES})
+target_link_libraries(xexample1_CBLAS cblas)
+target_link_libraries(xexample2_CBLAS cblas)
 
 add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS)
 add_test(example2_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample2_CBLAS)
diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt
--- a/CBLAS/src/CMakeLists.txt
+++ b/CBLAS/src/CMakeLists.txt
@@ -164,5 +164,9 @@
 endif(CBLAS_COMPLEX16)
 
 add_library(cblas ${ALLOBJ})
-target_link_libraries(cblas ${BLAS_LIBRARIES} )
+target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES})
+set_target_properties(
+  cblas PROPERTIES
+  LINKER_LANGUAGE C
+  )
 lapack_install_library(cblas)
diff --git a/CBLAS/testing/CMakeLists.txt b/CBLAS/testing/CMakeLists.txt
--- a/CBLAS/testing/CMakeLists.txt
+++ b/CBLAS/testing/CMakeLists.txt
@@ -55,9 +55,9 @@
   add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   
-  target_link_libraries(xscblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xscblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xscblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xscblat1 cblas)
+  target_link_libraries(xscblat2 cblas)
+  target_link_libraries(xscblat3 cblas)
  
   add_cblas_test(stest1.out ""   xscblat1)
   add_cblas_test(stest2.out sin2 xscblat2)
@@ -71,9 +71,9 @@
   add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   
-  target_link_libraries(xdcblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xdcblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xdcblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xdcblat1 cblas)
+  target_link_libraries(xdcblat2 cblas)
+  target_link_libraries(xdcblat3 cblas)
  
   add_cblas_test(dtest1.out ""   xdcblat1)
   add_cblas_test(dtest2.out din2 xdcblat2)
@@ -87,9 +87,9 @@
   add_executable(xccblat2 c_cblat2.f ${CTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   
-  target_link_libraries(xccblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xccblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xccblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xccblat1 cblas)
+  target_link_libraries(xccblat2 cblas)
+  target_link_libraries(xccblat3 cblas)
  
   add_cblas_test(ctest1.out ""   xccblat1)
   add_cblas_test(ctest2.out cin2 xccblat2)
@@ -103,9 +103,9 @@
   add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   
-  target_link_libraries(xzcblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xzcblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xzcblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xzcblat1 cblas)
+  target_link_libraries(xzcblat2 cblas)
+  target_link_libraries(xzcblat3 cblas)
  
   add_cblas_test(ztest1.out ""   xzcblat1)
   add_cblas_test(ztest2.out zin2 xzcblat2)
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 2.8.10)
-project(LAPACK Fortran)
+project(LAPACK C Fortran)
 
 set(LAPACK_MAJOR_VERSION 3)
 set(LAPACK_MINOR_VERSION 6)
diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
--- a/LAPACKE/CMakeLists.txt
+++ b/LAPACKE/CMakeLists.txt
@@ -46,17 +46,21 @@
 
 if (USE_XBLAS)
    add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
-   target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
+   target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES})
 else (USE_XBLAS)
   if (LAPACKE_WITH_TMG)
    add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
-   target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+   target_link_libraries(lapacke PRIVATE tmglib ${LAPACK_LIBRARIES})
   else (LAPACKE_WITH_TMG)
    add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
-   target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+   target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES})
   endif(LAPACKE_WITH_TMG)
 endif(USE_XBLAS)
 
+set_target_properties(
+  lapacke PROPERTIES
+  LINKER_LANGUAGE C
+  )
 lapack_install_library(lapacke)
 INSTALL( FILES ${LAPACKE_INCLUDE} DESTINATION include )
 
diff --git a/LAPACKE/example/CMakeLists.txt b/LAPACKE/example/CMakeLists.txt
--- a/LAPACKE/example/CMakeLists.txt
+++ b/LAPACKE/example/CMakeLists.txt
@@ -3,10 +3,10 @@
 add_executable(xexample_DGELS_rowmajor example_DGELS_rowmajor.c lapacke_example_aux.c lapacke_example_aux.h)
 add_executable(xexample_DGELS_colmajor example_DGELS_colmajor.c lapacke_example_aux.c lapacke_example_aux.h)
 
-target_link_libraries(xexample_DGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGESV_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGELS_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGELS_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+target_link_libraries(xexample_DGESV_rowmajor lapacke)
+target_link_libraries(xexample_DGESV_colmajor lapacke)
+target_link_libraries(xexample_DGELS_rowmajor lapacke)
+target_link_libraries(xexample_DGELS_colmajor lapacke)
 
 add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor)
 add_test(example_DGESV_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor)
diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in
--- a/LAPACKE/lapacke.pc.in
+++ b/LAPACKE/lapacke.pc.in
@@ -6,4 +6,4 @@
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack
 Libs: -L${libdir} -llapacke
-Requires: lapack blas
+Requires.private: lapack
diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
--- a/SRC/CMakeLists.txt
+++ b/SRC/CMakeLists.txt
@@ -455,12 +455,10 @@
 list(REMOVE_DUPLICATES ALLOBJ)
 
 add_library(lapack ${ALLOBJ} ${ALLXOBJ})
-target_link_libraries(lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
-
+target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
 set_target_properties(
   lapack PROPERTIES
   VERSION ${LAPACK_VERSION}
   SOVERSION ${LAPACK_MAJOR_VERSION}
   )
-
 lapack_install_library(lapack)
diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt
--- a/TESTING/EIG/CMakeLists.txt
+++ b/TESTING/EIG/CMakeLists.txt
@@ -119,7 +119,7 @@
 
 macro(add_eig_executable name )
   add_executable(${name} ${ARGN})
-  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
+  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
 endmacro(add_eig_executable)
 
 if (BUILD_SINGLE)
diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt
--- a/TESTING/LIN/CMakeLists.txt
+++ b/TESTING/LIN/CMakeLists.txt
@@ -193,7 +193,7 @@
 
 macro(add_lin_executable name )
   add_executable(${name} ${ARGN})
-  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
+  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
 endmacro(add_lin_executable)
 
 IF(BUILD_SINGLE)
diff --git a/lapack.pc.in b/lapack.pc.in
--- a/lapack.pc.in
+++ b/lapack.pc.in
@@ -6,4 +6,4 @@
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/lapack/
 Libs: -L${libdir} -llapack
-Requires: blas
+Requires.private: blas