Skip to content

Commit

Permalink
[openblas] Update to 0.3.5 (#5245)
Browse files Browse the repository at this point in the history
fixes: #5161, #4145
  • Loading branch information
zhihaoy authored and vicroms committed Feb 1, 2019
1 parent 78dd518 commit 9be25c1
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 103 deletions.
2 changes: 1 addition & 1 deletion ports/openblas/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
24 changes: 0 additions & 24 deletions ports/openblas/install-openblas.patch

This file was deleted.

23 changes: 9 additions & 14 deletions ports/openblas/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()


Expand All @@ -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}")
Expand All @@ -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 changes: 34 additions & 0 deletions ports/openblas/uwp.patch
Original file line number Diff line number Diff line change
@@ -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})
64 changes: 0 additions & 64 deletions ports/openblas/whitespace.patch

This file was deleted.

0 comments on commit 9be25c1

Please sign in to comment.