|
1 | | -set VSVersion="Visual Studio 16 2019" |
2 | | -rem build with VS 2017 |
3 | | -rem set VSVersion="Visual Studio 15 2017" |
| 1 | +REM This scripts build ORE and ORE_SWIG |
| 2 | +REM Adjust paths |
| 3 | +SET GENERATOR="Visual Studio 17 2022" |
| 4 | +SET DEMO_BOOST_ROOT=C:\local\boost_1_72_0 |
| 5 | +SET DEMO_BOOST_LIB=C:\local\boost_1_72_0\lib64-msvc-14.2 |
| 6 | +SET DEMO_SWIG_DIR=C:\dev\swigwin-4.1.1 |
| 7 | +SET DEMO_ORE_DIR=C:\dev\ore |
| 8 | +SET DEMO_ORE_SWIG_DIR=C:\dev\oreswig |
| 9 | +REM the next path is optional, but if not set, one need to set -DORE_USE_ZLIB=OFF |
| 10 | +SET DEMO_ZLIB_ROOT=C:\dev\vcpkg\packages\zlib_x64-windows |
| 11 | +REM SET VCPKG_ROOT=C:\dev\vcpkg |
| 12 | +REM If you use VCPKG for zlib and eigen, add -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake to the cmake command |
| 13 | + |
| 14 | + |
| 15 | +REM building ORE, one can skip this part, make sure to delete the build dir in the ORE_DIR if there is any |
| 16 | +REM it is recommended to install the eigen and zlib library on the system before building ORE |
| 17 | +ECHO BUILD ORE |
| 18 | +cd %DEMO_ORE_DIR% |
| 19 | +mkdir build |
| 20 | +cd %DEMO_ORE_DIR%\build |
| 21 | +SET BOOST_INCLUDEDIR=%DEMO_BOOST_ROOT% |
| 22 | +SET BOOST_LIBRARYDIR=%DEMO_BOOST_LIB% |
| 23 | +SET ZLIB_ROOT=%DEMO_ZLIB_ROOT% |
| 24 | +cmake -G %GENERATOR% -A x64 .. -DMSVC_LINK_DYNAMIC_RUNTIME=OFF -DORE_BUILD_DOC=OFF -DORE_BUILD_EXAMPLES=OFF -DORE_BUILD_TESTS=OFF -DORE_BUILD_APP=OFF -DQL_BUILD_BENCHMARK=OFF -DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DCMAKE_BUILD_TYPE=Release -DORE_USE_ZLIB=ON -DQL_ENABLE_SESSIONS=ON -DBoost_NO_SYSTEM_PATHS=ON |
| 25 | + |
| 26 | +cd %DEMO_ORE_DIR%\build |
| 27 | +cmake --build . --config Release |
| 28 | + |
| 29 | +ECHO BUILD ORESWIG |
| 30 | +cd %DEMO_ORE_SWIG_DIR%\OREAnalytics-SWIG\Python |
4 | 31 | mkdir build |
5 | | -mkdir install |
6 | | -cmake -G %VSVersion% -A x64 -DSWIG_DIR=C:\dev\swigwin\Lib -DSWIG_EXECUTABLE=C:\dev\swigwin\swig.exe -DORE:PATHNAME=C:\dev\ORE\master -DBOOST_ROOT=C:\dev\boost -S . -B build |
7 | | -cmake --build build -v --config Release |
| 32 | +cd build |
| 33 | +SET BOOST_INCLUDEDIR=%DEMO_BOOST_ROOT% |
| 34 | +SET BOOST_LIBRARYDIR=%DEMO_BOOST_LIB% |
| 35 | +SET SWIG_ROOT=%DEMO_SWIG_DIR% |
| 36 | +SET ZLIB_ROOT=%DEMO_ZLIB_ROOT% |
| 37 | +cmake -Wno-dev -G %GENERATOR% -A x64 .. -DORE=%DEMO_ORE_DIR% -DMSVC_LINK_DYNAMIC_RUNTIME=OFF -DORE_USE_ZLIB=ON -DBoost_NO_SYSTEM_PATHS=ON |
| 38 | +cmake --build . --config Release |
8 | 39 |
|
9 | | -rem copy all relevant python files to install |
10 | | -copy build\OREAnalytics-SWIG\Python\OREAnalytics.py install |
11 | | -copy build\OREData-SWIG\Python\OREData.py install |
12 | | -copy build\QuantExt-SWIG\Python\QuantExt.py install |
13 | | -copy build\QuantLib-SWIG\Python\QuantLib.py install |
14 | | -copy build\OREAnalytics-SWIG\Python\Release\*.* install |
15 | | -copy build\OREData-SWIG\Python\Release\*.* install |
16 | | -copy build\QuantExt-SWIG\Python\Release\*.* install |
17 | | -copy build\QuantLib-SWIG\Python\Release\*.* install |
| 40 | +REM now set your python path to build dir |
| 41 | +SET PYTHONPATH=%DEMO_ORE_SWIG_DIR%\OREAnalytics-SWIG\Python\build;%DEMO_ORE_SWIG_DIR%\OREAnalytics-SWIG\Python\build\Release |
18 | 42 |
|
19 | | -rem copy all relevant java files to install |
20 | | -copy build\OREAnalytics-SWIG\Java\OREAnalyticsJava.jar install |
21 | | -copy build\OREData-SWIG\Java\OREDataJava.jar install |
22 | | -copy build\QuantExt-SWIG\Java\QuantExtJava.jar install |
23 | | -copy build\QuantLib-SWIG\Java\QuantLibJava.jar install |
24 | | -copy build\OREAnalytics-SWIG\Java\Release\*.* install |
25 | | -copy build\OREData-SWIG\Java\Release\*.* install |
26 | | -copy build\QuantExt-SWIG\Java\Release\*.* install |
27 | | -copy build\QuantLib-SWIG\Java\Release\*.* install |
28 | | -pause |
|
0 commit comments