source: tol/building/MinGW/build_package.bat @ 2a0a3cd

1941-docker-image-to-testdevel
Last change on this file since 2a0a3cd was 4ff8483, checked in by Pedro Gea <pgea@…>, 11 years ago

Refs #1880
Se añade el atributo ejecutable a los scripts de Linux.
Se revisan los scripts para dejar sólo dos carpetas: MinGW y Linux.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@7102 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 2.8 KB
Line 
1@echo off
2rem ************************************************************
3rem  La llamada al script recibe dos argumentos:
4rem    build_package [|<package_name>] [|release|debug]
5rem ************************************************************
6rem  Durante el proceso se pregunta por cada una de las etapas.
7rem ************************************************************
8setlocal enabledelayedexpansion
9
10set BUILD_DIR=%~dp0
11set BUILD_DIR=%BUILD_DIR:~0,-1%
12
13call !BUILD_DIR!\cmake_prepare.bat
14
15if !PROCESSOR_ARCHITECTURE!==x86 (
16  if "!platform!"=="" (
17    set platform=32
18  )
19  if not "!platform!"=="32" (
20    echo.^(^^!^) Current system cannot compile for !platform!-bit.
21    exit /b
22  )
23  set platform=32
24) else (
25  if "!platform!"=="" (
26    set /p platform="platform (32/64)? "
27  )
28  if not "!platform!"=="32" if not "!platform!"=="64" (
29    echo.^(^^!^) Platform word size should be 32 or 64.
30    exit /b
31  )
32)
33
34if "%1"=="" (
35  set /p package="package? "
36) else (
37  set package=%1
38)
39
40set PACKAGE_DIR=!BUILD_DIR!\..\..\..\OfficialTolArchiveNetwork\%package%
41if not exist "!PACKAGE_DIR!\CMakeLists.txt" (
42  if exist !PACKAGE_DIR! (
43    echo.^(^^!^) Cannot find the CMakeLists.txt
44  ) else (
45    echo.^(^^!^) Cannot find the package !package!.
46  )
47  exit /b
48)
49
50set mode=%2
51if "!mode!"=="" set mode=release
52if "!mode!"=="release" goto mode_ok
53if "!mode!"=="debug" goto mode_ok
54echo.^(^^!^) Second argument should be: release, debug or should be avoided.
55exit /b
56:mode_ok
57
58echo.
59echo.----------------------------------------------------
60echo. Building !package! - !mode! ^(!platform!^)
61echo.----------------------------------------------------
62
63set CMAKE_DIR=!USERPROFILE!\CMake_Build\packages\!package!\!mode!-!platform!
64if exist "!CMAKE_DIR!" (
65  echo.
66  echo./^^!\ There is already a built folder of !package!
67  set /p answer="mkdir? (y/n) "
68  if "!answer!"=="y" (
69    rmdir /s /Q "!CMAKE_DIR!"
70    mkdir "!CMAKE_DIR!"
71  )
72) else (
73  mkdir "!CMAKE_DIR!"
74)
75cd "!CMAKE_DIR!"
76
77echo.
78set /p answer="cmake? (y/n) "
79if "!answer!"=="y" ( 
80  set CMAKE_TOOLCHAIN=!BUILD_DIR!\..\..\tol\cmake\mingw-m!platform!.toolchain.cmake
81  set TOL_RUNTIME=!USERPROFILE!\CMake_Build\tol\!mode!-!platform!\Runtime_Base 
82  rem !! cmake -DTOL_PREFIX_PATH=!TOL_RUNTIME! -DCMAKE_TOOLCHAIN_FILE=!CMAKE_TOOLCHAIN! -DCMAKE_BUILD_TYPE=!mode! -G"CodeLite - MinGW Makefiles" ..\..\.. -DCBLAS_DIR=c:/users/toldevel/external/atlas-windows -DCLAPACK_DIR=c:/users/toldevel/external/atlas-windows
83  cmake -DTOL_PREFIX_PATH=!TOL_RUNTIME! -DCMAKE_TOOLCHAIN_FILE=!CMAKE_TOOLCHAIN! -DCMAKE_BUILD_TYPE=!mode! -G"CodeLite - MinGW Makefiles" "!PACKAGE_DIR!"
84)
85
86echo.
87set /p answer="make? (y/n) "
88if "!answer!"=="y" (
89  mingw32-make
90)
91
92cd "!BUILD_DIR!"
93echo.
94exit /b
Note: See TracBrowser for help on using the repository browser.