Update CMakeLists.txt

This commit is contained in:
Martin Kroeker 2021-11-14 19:27:08 +01:00 committed by GitHub
parent 70b5169bbf
commit 7a914dd280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -191,6 +191,15 @@ if(ANDROID)
target_link_libraries(${OpenBLAS_LIBNAME} m)
endif()
if (APPLE)
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set (CMAKE_C_LINK_EXECUTABLE
"${CMAKE_COMMAND} cat CMakeFiles/openblas.rsp | xargs -n1024 ar -ur libopenblas.a"
"${CMAKE_COMMAND} echo "" | <CMAKE_Fortran_COMPILER> -o dummy.o -c -x f95-cpp-input -"
"<CMAKE_Fortran_COMPILER> <FLAGS> -Wl,-force_load,${OpenBLAS_LIBNAME} dummy.o")
endif()
# Handle MSVC exports
if(MSVC AND BUILD_SHARED_LIBS)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.4)