From 7fcbcfa91595ef02e02b8fcb08421ea7b7621831 Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Fri, 14 Apr 2017 16:28:34 +0200 Subject: [PATCH] improving handling of OpenBLAS on Windows --- CHANGES | 2 ++ .../.cm/meta.json | 11 ++++++++ .../scripts.win/install.bat | 28 +++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 1e874c9..669cd38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +* 2017.04.14 - improving handling of OpenBLAS on Windows + * 2017.04.05 - added package:lib-opencv-2.4.13.2 and lib-opencv-3.2.0 * 2017.03.26 - finishing unifying CLBlast autotuning package across Linux, Windows, Android diff --git a/package/lib-openblas-0.2.19-universal/.cm/meta.json b/package/lib-openblas-0.2.19-universal/.cm/meta.json index 837483e..5015c90 100644 --- a/package/lib-openblas-0.2.19-universal/.cm/meta.json +++ b/package/lib-openblas-0.2.19-universal/.cm/meta.json @@ -33,6 +33,17 @@ "sort": 10, "tags": "compiler,lang-c" }, + "compiler-gfortran": { + "local": "yes", + "name": "GNU Fortran compiler", + "skip_from_bat":"yes", + "only_for_target_os_tags": [ + "windows", + "linux" + ], + "sort": 15, + "tags": "compiler,gfortran" + }, "utils-unix-win": { "local": "yes", "force_target_as_host": "yes", diff --git a/package/lib-openblas-0.2.19-universal/scripts.win/install.bat b/package/lib-openblas-0.2.19-universal/scripts.win/install.bat index 8fcc05f..c6dbaa3 100644 --- a/package/lib-openblas-0.2.19-universal/scripts.win/install.bat +++ b/package/lib-openblas-0.2.19-universal/scripts.win/install.bat @@ -13,10 +13,33 @@ rem ############################################################ echo. echo Preparing vars ... +rem Check make + +where make.exe +if %errorlevel% == 0 ( + set CK_CUR_MAKE=make +) + +where mingw64-make.exe +if %errorlevel% == 0 ( + set CK_CUR_MAKE=mingw64-make +) + +where mingw32-make.exe +if %errorlevel% == 0 ( + set CK_CUR_MAKE=mingw32-make +) + +if "%CK_CUR_MAKE%" == "" ( + echo. + echo Error: can't detect make! + goto err +) + cd %INSTALL_DIR%\%PACKAGE_SUB_DIR% rem mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1 -make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% CC=gcc FC=gfortran +%CK_CUR_MAKE% PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% CC=gcc FC=gfortran if %errorlevel% neq 0 ( echo. @@ -24,7 +47,8 @@ if %errorlevel% neq 0 ( goto err ) -mingw32-make install PREFIX="%INSTALL_DIR%\install" +rem mingw32-make install PREFIX="%INSTALL_DIR%\install" +%CK_CUR_MAKE% install PREFIX="%INSTALL_DIR%\install" if %errorlevel% neq 0 ( echo.