Skip to content

Commit

Permalink
[openblas]Disable cross-compiling to fix uwp build. (#6181)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY authored and grdowns committed Apr 23, 2019
1 parent 8da8c0a commit 91aa28f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
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.3.5-2
Version: 0.3.5-3
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
1 change: 1 addition & 0 deletions ports/openblas/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
message("openblas currenly only supports dynamic library linkage")
set(VCPKG_LIBRARY_LINKAGE "dynamic")
endif()
set(CMAKE_CROSSCOMPILING OFF)
endif()

vcpkg_from_github(
Expand Down
16 changes: 16 additions & 0 deletions ports/openblas/uwp.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
--- 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 @@
Expand Down Expand Up @@ -32,3 +33,18 @@

# append config data from getarch_2nd to the TARGET file and read in CMake vars
file(APPEND ${TARGET_CONF_TEMP} ${GETARCH2_CONF_OUT})

diff --git a/cmake/system.cmake b/cmake/system.cmake
index a060d98..52ffa5a 100644
--- a/cmake/system.cmake
+++ b/cmake/system.cmake
@@ -13,6 +13,9 @@ if(CMAKE_CROSSCOMPILING AND NOT DEFINED TARGET)
set(TARGET "ARMV8")
elseif(ARM)
set(TARGET "ARMV7") # TODO: Ask compiler which arch this is
+ elseif(${HOST_OS} STREQUAL "WINDOWSSTORE")
+ set(CMAKE_CROSSCOMPILING 0)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
else()
message(FATAL_ERROR "When cross compiling, a TARGET is required.")
endif()

0 comments on commit 91aa28f

Please sign in to comment.