source: tol/building/MinGW/build.bat @ 9c4daac

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

Refs #1880
Se añade el proyecto vbtol al script build.bat.

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

  • Property mode set to 100644
File size: 3.2 KB
Line 
1@echo off
2rem ************************************************************
3rem  La llamada al script recibe dos argumentos:
4rem    build [tol|toltcl|tolbase|vbtol|rtol] [|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 project="project? "
36) else (
37  set project=%1
38)
39if "!project!"=="tol" goto project_ok
40if "!project!"=="toltcl" goto project_ok
41if "!project!"=="tolbase" goto project_ok
42if "!project!"=="vbtol" goto project_ok
43if "!project!"=="rtol" goto project_ok
44echo.^(^^!^) First argument should be: tol, toltcl, tolbase, vbtol or rtol.
45exit /b
46:project_ok
47
48set PROJECT_DIR=!BUILD_DIR!\..\..\!project!
49if not exist "!PROJECT_DIR!" (
50  echo.^(^^!^) Cannot find folder: !PROJECT_DIR!
51  exit /b
52)
53
54set mode=%2
55if "!mode!"=="" set mode=Release
56if "!mode!"=="Release" goto mode_ok
57if "!mode!"=="Debug" goto mode_ok
58echo.^(^^!^) Second argument should be: Release, Debug or should be avoided.
59exit /b
60:mode_ok
61
62echo.
63echo.----------------------------------------------------
64echo. Building !project! - !mode! ^(!platform!^)
65echo.----------------------------------------------------
66
67if "!project!"=="tol" (
68  set TOL_CONTRIBS=!BUILD_DIR!\..\..\..\toldevel-rtools-m!platform!
69  if not exist "!TOL_CONTRIBS!" (
70    echo.^(^^!^) Cannot find folder: !TOL_CONTRIBS!
71    exit /b
72  )
73)
74
75set CMAKE_DIR=!USERPROFILE!\CMake_Build\!project!\!mode!-!platform!
76if exist "!CMAKE_DIR!" (
77  echo.
78  echo./^^!\ There is already a built folder of !project!
79  set /p answer="mkdir? (y/n) "
80  if "!answer!"=="y" (
81    rmdir /s /Q "!CMAKE_DIR!"
82    mkdir "!CMAKE_DIR!"
83  )
84) else (
85  mkdir "!CMAKE_DIR!"
86)
87cd "!CMAKE_DIR!"
88
89echo.
90set /p answer="cmake? (y/n) "
91if "!answer!"=="y" (
92  set CMAKE_TOOLCHAIN=!BUILD_DIR!\..\..\tol\cmake\mingw-m!platform!-O3-mtune_native.toolchain.cmake
93  if "!project!"=="tol" (
94    cmake -DCLAPACK_NAME=lapacke -DTOL_EXTERNAL_DEVEL_DIR="!TOL_CONTRIBS!" -DCMAKE_TOOLCHAIN_FILE="!CMAKE_TOOLCHAIN!" -DCMAKE_BUILD_TYPE=!mode! -G"CodeLite - MinGW Makefiles" "!PROJECT_DIR!"
95  ) else (
96    set TOL_RUNTIME=!USERPROFILE!\CMake_Build\tol\!mode!-!platform!\Runtime_Base
97    cmake -DTOL_PREFIX_PATH="!TOL_RUNTIME!" -DCMAKE_TOOLCHAIN_FILE="!CMAKE_TOOLCHAIN!" -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=!mode! -G"CodeLite - MinGW Makefiles" "!PROJECT_DIR!"
98  )
99)
100
101echo.
102set /p answer="make? (y/n) "
103if "!answer!"=="y" (
104  mingw32-make
105)
106
107echo.
108set /p answer="install? (y/n) "
109if "!answer!"=="y" (
110  mingw32-make install
111)
112
113cd "!BUILD_DIR!"
114echo.
115exit /b
Note: See TracBrowser for help on using the repository browser.