Skip to content

Commit 59b8184

Browse files
committed
add OPENBLAS_EXPORT to cblas.h during build, remove for install
1 parent e607232 commit 59b8184

File tree

3 files changed

+258
-256
lines changed

3 files changed

+258
-256
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ if(NOT NO_CBLAS)
676676
message (STATUS "Generating cblas.h in ${CMAKE_INSTALL_INCLUDEDIR}")
677677
set(CBLAS_H ${CMAKE_BINARY_DIR}/generated/cblas.h)
678678
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h CBLAS_H_CONTENTS)
679-
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS}")
679+
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW2 "${CBLAS_H_CONTENTS}")
680+
string(REPLACE "OPENBLAS_EXPORT " "" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS_NEW2}")
680681
if (NOT ${SYMBOLPREFIX} STREQUAL "")
681682
string(REPLACE " cblas" " ${SYMBOLPREFIX}cblas" CBLAS_H_CONTENTS "${CBLAS_H_CONTENTS_NEW}")
682683
string(REPLACE " openblas" " ${SYMBOLPREFIX}openblas" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS}")

Makefile.install

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ ifdef SYMBOLSUFFIX
8686
@sed 's/openblas[^() ]*/&$(SYMBOLSUFFIX)/g' cblas.tmp2 > cblas.tmp
8787
#change back any openblas_complex_float and double that got hit
8888
@sed 's/\(openblas_complex_\)\([^ ]*\)$(SYMBOLSUFFIX)/\1\2 /g' cblas.tmp > cblas.tmp2
89-
@sed 's/goto[^() ]*/&$(SYMBOLSUFFIX)/g' cblas.tmp2 > cblas.tmp
89+
@sed 's/goto[^() ]*/&$(SYMBOLSUFFIX)/g' cblas.tmp2 > cblas.tmp3
9090
endif
91+
@sed 's/OPENBLAS_EXPORT //' cblas.tmp3 > cblas.tmp
9192
@sed 's/common/openblas_config/g' cblas.tmp > "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/cblas.h"
9293
endif
9394

0 commit comments

Comments
 (0)