From 1f5c9019f1de6daea7ace4216c9c5c5803c9bf1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Have=CC=81?= Date: Sun, 12 Nov 2023 19:33:55 +0100 Subject: [PATCH] Add workaround to avoid conflict in locally defined blas functions --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5286790..4056124 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,16 @@ set(EMBED_CUSTOM_BLAS ON) # # target_link_libraries(${PROJECT_NAME} INTERFACE blas) #endif () +if (EMBED_CUSTOM_BLAS) + # to avoid collision with outer blas + # short rename to avoid truncate code interpretation after column #72 + target_compile_definitions(${PROJECT_NAME} PRIVATE dcopy_=Wcopy_) + target_compile_definitions(${PROJECT_NAME} PRIVATE dscal_=Wscal_) + target_compile_definitions(${PROJECT_NAME} PRIVATE daxpy_=Waxpy_) + target_compile_definitions(${PROJECT_NAME} PRIVATE dnrm2_=Wnrm2_) + target_compile_definitions(${PROJECT_NAME} PRIVATE ddot_=Wdot_) +endif () + target_include_directories( ${PROJECT_NAME} INTERFACE $ @@ -51,7 +61,7 @@ install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel - ) +) install(FILES ${HEADERS} DESTINATION "include/${PROJECT_NAME}")