Skip to content

Commit

Permalink
improving handling of OpenBLAS on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Apr 14, 2017
1 parent f2ad6f1 commit 7fcbcfa
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions package/lib-openblas-0.2.19-universal/.cm/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 26 additions & 2 deletions package/lib-openblas-0.2.19-universal/scripts.win/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,42 @@ 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.
echo Error: make failed!
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.
Expand Down

0 comments on commit 7fcbcfa

Please sign in to comment.