QuantLib batch compile (VC++ Express)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

QuantLib batch compile (VC++ Express)

Piter Dias-3
People,

I write a small batch file to make QuantLib (and its sub-projects) easier. It
compiles boost too.
The idea is using vcbuild.exe to from VC++ Express.
I hope you guys enjoy because I use it to compile from boost to QuantLibXL.
If you guys needs further help, please reply in this forum.

Regards.

Piter Dias
[hidden email]

Rem QuantLib.cmd C:\desenv 0.3.13 1_34 QuantLibBuild.log

set BASE_DIR=%1
set QUANTLIB_VERSION=QuantLib_%2
set BOOST_VER=boost-%3
set LOG_FILE=%4

echo
--------------------------------------------------------------------------------------

echo Setting environment >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

set BOOST_DIR=%BASE_DIR%\%BOOST_VER%\boost
set QUANTLIB_DIR=%BASE_DIR%\%QUANTLIB_VERSION%\QuantLib
set LOG4CXX_DIR=%BASE_DIR%\%QUANTLIB_VERSION%\log4cxx-0.9.7
set OBJECT_HANDLER_DIR=%BASE_DIR%\%QUANTLIB_VERSION%\ObjectHandler
set QUANTLIBADDIN_DIR=%BASE_DIR%\%QUANTLIB_VERSION%\QuantLibAddin
set QUANTLIBXL_DIR= %BASE_DIR%\%QUANTLIB_VERSION%\QuantLibXL
set GENSRC_DIR=%BASE_DIR%\%QUANTLIB_VERSION%\gensrc

set PATH=%PATH%;C:\Python24;C:\Program Files\Microsoft Platform SDK for
Windows Server 2003 R2\Bin;%BASE_DIR%

set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft Platform SDK for Windows
Server 2003
R2\include;%BASE_DIR%\include;%QUANTLIB_DIR%;%QUANTLIB_DIR%\functions;%BASE_DIR%\include\%BOOST_VER%
set LIB=%LIB%;C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\lib;%BASE_DIR%\lib;%QUANTLIB_DIR%\lib
set LIBS=%LIB%

echo
--------------------------------------------------------------------------------------

echo Starting compiling Boost >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %BOOST_DIR%
bjam -sTOOLS=vc-8_0 --prefix=%BASE_DIR% --includedir=%BASE_DIR%\include
--with-python-root=C:\Python24 --with-python-version=2.4 --with-pydebug
install

echo Finished compiling Boost >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

echo Starting compiling QuantLib >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %QUANTLIB_DIR%
vcbuild /useenv /time /logcommands /htmllog:QuantLib.html QuantLib_vc8.sln
"Release|Win32"

echo Finished compiling QuantLib >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

echo Starting compiling Log4cxx >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %LOG4CXX_DIR%\msvc
vcbuild /useenv /time /logcommands /htmllog:log4cxx.html log4cxx_vc8.sln
"Release|Win32"

echo Finished compiling Log4cxx >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

echo Starting compiling ObjectHandler >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %OBJECT_HANDLER_DIR%
vcbuild /useenv /time /logcommands /htmllog:ObjectHandler.html
ObjectHandler_vc8.sln "Release|Win32"

echo Finished compiling ObjectHandler >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

echo Starting compiling QuantLibAddin >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %QUANTLIBADDIN_DIR%
vcbuild /useenv /time /logcommands /htmllog:QuantLibAddin.html
QuantLibAddin_vc8.sln "Release|Win32"

echo Finished compiling QuantLibAddin >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

echo Starting compiling QuantLibXL >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

cd %QUANTLIBXL_DIR%
vcbuild /useenv /time /logcommands /htmllog:QuantLibXL.html
QuantLibXL_vc8.sln "Release|Win32"

echo Finished compiling QuantLibXL >>%BASE_DIR%\%LOG_FILE%
date /T >>%BASE_DIR%\%LOG_FILE%
time /T >>%BASE_DIR%\%LOG_FILE%

echo
--------------------------------------------------------------------------------------

cd %BASE_DIR%