update source for windows
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||
# 添加openblas库的地址
|
||||
include_directories(D:/Library/include)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
||||
@@ -36,6 +38,11 @@ set_target_properties(magtess PROPERTIES VERSION 1.0 SOVERSION 1.0)
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
||||
target_link_libraries(magtess PUBLIC openblas)
|
||||
target_link_libraries(magtess PUBLIC m)
|
||||
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
||||
#
|
||||
find_library(OPENBLAS_LIBRARY libopenblas D:/Library/lib)
|
||||
target_link_libraries(magtess PUBLIC ${OPENBLAS_LIBRARY})
|
||||
target_link_libraries(magtess_static ${OPENBLAS_LIBRARY})
|
||||
endif()
|
||||
|
||||
# 库的安装命令
|
||||
|
@@ -12,6 +12,8 @@ Functions matrix and vector multiplications.
|
||||
|
||||
#ifdef __linux__ // Debian, Ubuntu, Gentoo, Fedora, openSUSE, RedHat, Centos and other
|
||||
#include <cblas.h>
|
||||
#elif _WINDOWS || __WIN32__ // Added for windows by Yi Zhang on 2021-08-26
|
||||
#include <cblas.h>
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
#include <Accelerate/Accelerate.h>
|
||||
#else
|
||||
|
Reference in New Issue
Block a user