[openblas]Disable cross-compiling to fix uwp build. (#6181)

This commit is contained in:
JackBoosY 2019-04-24 04:41:42 +08:00 committed by Griffin Downs
parent 8da8c0a9f6
commit 91aa28f14d
3 changed files with 18 additions and 1 deletions

View File

@ -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.

View File

@ -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(

View File

@ -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 @@
@ -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()