@@ -119,6 +119,9 @@ list(REMOVE_DUPLICATES SOURCES)
119119
120120add_library (${CBLASLIB} _obj OBJECT ${SOURCES} )
121121set_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 ()
122125
123126if (BUILD_INDEX64_EXT_API)
124127 # 64bit Integer Interface
@@ -143,6 +146,9 @@ if(BUILD_INDEX64_EXT_API)
143146 LINKER_LANGUAGE C)
144147 target_compile_options (${CBLASLIB} _64_cobj PRIVATE -DWeirdNEC -DCBLAS_API64)
145148 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 ()
146152 #Add suffix to all Fortran functions via macros
147153 foreach (F IN LISTS SOURCES_64_F)
148154 set (COPT_64_F)
@@ -169,11 +175,8 @@ set_target_properties(
169175 SOVERSION ${LAPACK_MAJOR_VERSION}
170176 POSITION_INDEPENDENT_CODE ON
171177 )
172- if (HAS_ATTRIBUTE_WEAK_SUPPORT)
173- target_compile_definitions (${CBLASLIB} PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT)
174- endif ()
178+
175179target_include_directories (${CBLASLIB} PUBLIC
176- $<BUILD_INTERFACE:${LAPACK_BINARY_DIR} /include >
177180 $<INSTALL_INTERFACE:include >
178181)
179182target_link_libraries (${CBLASLIB} PUBLIC ${BLAS_LIBRARIES} )
0 commit comments