@@ -119,6 +119,9 @@ list(REMOVE_DUPLICATES SOURCES)
119
119
120
120
add_library (${CBLASLIB} _obj OBJECT ${SOURCES} )
121
121
set_target_properties (${CBLASLIB} _obj PROPERTIES POSITION_INDEPENDENT_CODE ON )
122
+ if (HAS_ATTRIBUTE_WEAK_SUPPORT )
123
+ target_compile_definitions (${CBLASLIB} _obj PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT )
124
+ endif ()
122
125
123
126
if (BUILD_INDEX64_EXT_API )
124
127
# 64bit Integer Interface
@@ -143,6 +146,9 @@ if(BUILD_INDEX64_EXT_API)
143
146
LINKER_LANGUAGE C )
144
147
target_compile_options (${CBLASLIB} _64_cobj PRIVATE -DWeirdNEC -DCBLAS_API64 )
145
148
target_compile_options (${CBLASLIB} _64_fobj PRIVATE ${FOPT_ILP64} )
149
+ if (HAS_ATTRIBUTE_WEAK_SUPPORT )
150
+ target_compile_definitions (${CBLASLIB} _64_cobj PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT )
151
+ endif ()
146
152
#Add suffix to all Fortran functions via macros
147
153
foreach (F IN LISTS SOURCES_64_F )
148
154
set (COPT_64_F )
@@ -169,11 +175,8 @@ set_target_properties(
169
175
SOVERSION ${LAPACK_MAJOR_VERSION}
170
176
POSITION_INDEPENDENT_CODE ON
171
177
)
172
- if (HAS_ATTRIBUTE_WEAK_SUPPORT )
173
- target_compile_definitions (${CBLASLIB} PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT )
174
- endif ()
178
+
175
179
target_include_directories (${CBLASLIB} PUBLIC
176
- $< BUILD_INTERFACE:${LAPACK_BINARY_DIR} /include>
177
180
$< INSTALL_INTERFACE:include>
178
181
)
179
182
target_link_libraries (${CBLASLIB} PUBLIC ${BLAS_LIBRARIES} )
0 commit comments