mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
parent
78dd5184dc
commit
9be25c17aa
@ -1,3 +1,3 @@
|
||||
Source: openblas
|
||||
Version: 0.2.20-2
|
||||
Version: 0.3.5
|
||||
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a379f549..f95a872b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -16,7 +16,7 @@ enable_language(C)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(MSVC)
|
||||
-set(OpenBLAS_LIBNAME libopenblas)
|
||||
+set(OpenBLAS_LIBNAME openblas)
|
||||
else()
|
||||
set(OpenBLAS_LIBNAME openblas)
|
||||
endif()
|
||||
@@ -197,6 +197,10 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
|
||||
SOVERSION ${OpenBLAS_MAJOR_VERSION}
|
||||
)
|
||||
|
||||
+install(TARGETS ${OpenBLAS_LIBNAME}
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
|
||||
# TODO: Why is the config saved here? Is this necessary with CMake?
|
||||
#Save the config files for installation
|
@ -24,14 +24,14 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xianyi/OpenBLAS
|
||||
REF v0.2.20
|
||||
SHA512 8dfc8e8c8d456b834d2e9544c8eadd9f4770e30db8b8dd76af601ec0735fd86c9cf63dd6a03ccd23fc02ec2e05069a09875b9073dfe29f99aadab3a958ae2634
|
||||
REF v0.3.5
|
||||
SHA512 91b3074eb922453bf843158b4281cde65db9e8bbdd7590e75e9e6cdcb486157f7973f2936f327bb3eb4f1702ce0ba51ae6729d8d4baf2d986c50771e8f696df0
|
||||
HEAD_REF develop
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch" "${CMAKE_CURRENT_LIST_DIR}/whitespace.patch"
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/uwp.patch"
|
||||
)
|
||||
|
||||
find_program(GIT NAMES git git.cmd)
|
||||
@ -77,16 +77,14 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
OPTIONS -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE -DBUILD_WITHOUT_LAPACK=ON
|
||||
"-DBLASHELPER_BINARY_DIR=${CURRENT_BUILDTREES_DIR}/x64-windows-rel")
|
||||
|
||||
elseif(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DBUILD_WITHOUT_LAPACK=ON)
|
||||
else()
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DTARGET=NEHALEM -DBUILD_WITHOUT_LAPACK=ON
|
||||
# PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
OPTIONS -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DNOFORTRAN=ON)
|
||||
endif()
|
||||
|
||||
|
||||
@ -97,9 +95,6 @@ vcpkg_install_cmake()
|
||||
# this is only to quite vcpkg
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/openblas_common.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/config.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/config.h ${CURRENT_PACKAGES_DIR}/include/openblas_config.h)
|
||||
|
||||
file(READ ${SOURCE_PATH}/cblas.h CBLAS_H)
|
||||
string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}")
|
||||
@ -110,4 +105,4 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DI
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
34
ports/openblas/uwp.patch
Normal file
34
ports/openblas/uwp.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- a/cmake/prebuild.cmake 2019-01-28 03:05:58.422245700 -0600
|
||||
+++ b/cmake/prebuild.cmake 2019-01-28 03:07:02.885495800 -0600
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
# CPUIDEMU = ../../cpuid/table.o
|
||||
|
||||
+if (NOT DEFINED BLASHELPER_BINARY_DIR)
|
||||
+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
|
||||
+endif ()
|
||||
|
||||
if (DEFINED CPUIDEMU)
|
||||
set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
|
||||
@@ -310,8 +313,8 @@ else(NOT CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "Running getarch")
|
||||
|
||||
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
||||
-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
||||
-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
||||
+execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
||||
+execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
||||
|
||||
message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
|
||||
|
||||
@@ -337,8 +340,8 @@ execute_process(COMMAND "${PROJECT_BINAR
|
||||
endif ()
|
||||
|
||||
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
||||
-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
||||
-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
||||
+execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN}" 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
||||
+execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN}" 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
||||
|
||||
# append config data from getarch_2nd to the TARGET file and read in CMake vars
|
||||
file(APPEND ${TARGET_CONF_TEMP} ${GETARCH2_CONF_OUT})
|
@ -1,64 +0,0 @@
|
||||
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
|
||||
index 02ab708..b51bd0b 100644
|
||||
--- a/cmake/prebuild.cmake
|
||||
+++ b/cmake/prebuild.cmake
|
||||
@@ -37,6 +37,10 @@
|
||||
|
||||
# CPUIDEMU = ../../cpuid/table.o
|
||||
|
||||
+if (NOT DEFINED BLASHELPER_BINARY_DIR)
|
||||
+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
|
||||
+endif ()
|
||||
+
|
||||
if (DEFINED CPUIDEMU)
|
||||
set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
|
||||
endif ()
|
||||
@@ -87,7 +87,7 @@ file(MAKE_DIRECTORY ${GETARCH_DIR})
|
||||
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
try_compile(GETARCH_RESULT ${GETARCH_DIR}
|
||||
SOURCES ${GETARCH_SRC}
|
||||
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${PROJECT_SOURCE_DIR}
|
||||
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GETARCH_LOG
|
||||
COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN}
|
||||
)
|
||||
@@ -95,8 +99,8 @@ endif ()
|
||||
message(STATUS "Running getarch")
|
||||
|
||||
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
||||
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
||||
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
||||
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
||||
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
||||
|
||||
message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
|
||||
|
||||
@@ -114,7 +114,7 @@ file(MAKE_DIRECTORY ${GETARCH2_DIR})
|
||||
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
try_compile(GETARCH2_RESULT ${GETARCH2_DIR}
|
||||
SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c
|
||||
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${PROJECT_SOURCE_DIR}
|
||||
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GETARCH2_LOG
|
||||
COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN}
|
||||
)
|
||||
@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
endif ()
|
||||
|
||||
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
||||
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
||||
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
||||
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
||||
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
||||
|
||||
# append config data from getarch_2nd to the TARGET file and read in CMake vars
|
||||
file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})
|
||||
@@ -141,7 +141,7 @@ file(MAKE_DIRECTORY ${GEN_CONFIG_H_DIR})
|
||||
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
||||
try_compile(GEN_CONFIG_H_RESULT ${GEN_CONFIG_H_DIR}
|
||||
SOURCES ${PROJECT_SOURCE_DIR}/gen_config_h.c
|
||||
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I${PROJECT_SOURCE_DIR}
|
||||
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GEN_CONFIG_H_LOG
|
||||
COPY_FILE ${PROJECT_BINARY_DIR}/${GEN_CONFIG_H_BIN}
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user