Skip to content

Commit af77ebf

Browse files
authored
Merge pull request #950 from ACSimon33/cblas_weak_attribute
2 parents 9560fe2 + 10432bb commit af77ebf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

CBLAS/src/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ list(REMOVE_DUPLICATES SOURCES)
119119

120120
add_library(${CBLASLIB}_obj OBJECT ${SOURCES})
121121
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()
122125

123126
if(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+
175179
target_include_directories(${CBLASLIB} PUBLIC
176-
$<BUILD_INTERFACE:${LAPACK_BINARY_DIR}/include>
177180
$<INSTALL_INTERFACE:include>
178181
)
179182
target_link_libraries(${CBLASLIB} PUBLIC ${BLAS_LIBRARIES})

0 commit comments

Comments
 (0)