Skip to content

Commit cdb321b

Browse files
rolandlichtersjenkins
authored andcommitted
Merge remote-tracking branch 'origin/QPR-11715' into QPR-11715
1 parent bda6baf commit cdb321b

1 file changed

Lines changed: 47 additions & 28 deletions

File tree

Docs/UserGuide/userguide.tex

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -600,17 +600,17 @@ \subsubsection{Git}
600600
\subsubsection{Boost}\label{sec:boost}
601601

602602
QuantLib and ORE depend on the boost C++ libraries. Hence these need to be installed before building QuantLib and
603-
ORE. On all platforms the minimum required boost version is 1\_63 as of ORE release 5.
604-
%Older versions may work on some platforms and system configurations, but were not tested.
603+
ORE. On all platforms the minimum required boost version is 1\_78.
604+
%Other versions may work on some platforms and system configurations, but were not tested.
605605

606606
\subsubsection*{Windows}
607607

608608
\begin{enumerate}
609-
\item Download the pre-compiled binaries for MSVC-14 (MSVC2015) from \cite{boost-binaries}
609+
\item Download the pre-compiled binaries for your MSVC version (e.g. MSVC-14.2 for MSVC2019) from \cite{boost-binaries}
610610
%, any recent version should work
611611
\begin{itemize}
612-
\item 32-bit: \cite{boost-binaries}{\bs}VERSION{\bs}boost\_VERSION-msvc-14.0-32.exe{\bs}download
613-
\item 64-bit: \cite{boost-binaries}{\bs}VERSION{\bs}boost\_VERSION-msvc-14.0-64.exe{\bs}download
612+
\item 32-bit: \cite{boost-binaries}{\bs}VERSION{\bs}boost\_VERSION-msvc-14.2-32.exe{\bs}download
613+
\item 64-bit: \cite{boost-binaries}{\bs}VERSION{\bs}boost\_VERSION-msvc-14.2-64.exe{\bs}download
614614
\end{itemize}
615615
\item Start the installation file and choose an installation folder (the ``boost root directory''). Take a note of that folder as it will be needed later on.
616616
\item Finish the installation by clicking Next a couple of times.
@@ -621,8 +621,8 @@ \subsubsection*{Windows}
621621
\begin{enumerate}
622622
\item Open a Visual Studio Tools Command Prompt
623623
\begin{itemize}
624-
\item 32-bit: VS2015/VS2013 x86 Native Tools Command Prompt
625-
\item 64-bit: VS2015/VS2013 x64 Native Tools Command Prompt
624+
\item 32-bit: VS2019 x86 Native Tools Command Prompt
625+
\item 64-bit: VS2019 x64 Native Tools Command Prompt
626626
\end{itemize}
627627
\item Navigate to the boost root directory
628628
\item Run bootstrap.bat
@@ -662,30 +662,38 @@ \subsubsection*{Windows}
662662
Set environment variables, e.g.:
663663
\begin{itemize}
664664
\item {\tt \%BOOST\%} pointing to your directory, e.g, {\tt C:{\bs}boost\_1\_72\_0}
665-
\item {\tt \%BOOST\_LIB32\%} pointing to your Win32 lib directory, e.g, {\tt C:{\bs}boost\_1\_72\_0{\bs}lib32\-msvc\-14.0}
666-
\item {\tt \%BOOST\_LIB64\%} pointing to your x64 lib directory, e.g, {\tt C:{\bs}boost\_1\_72\_0{\bs}lib64\-msvc\-14.0}
665+
\item {\tt \%BOOST\_LIB32\%} pointing to your Win32 lib directory, e.g, {\tt C:{\bs}boost\_1\_72\_0{\bs}lib32\-msvc\-14.2}
666+
\item {\tt \%BOOST\_LIB64\%} pointing to your x64 lib directory, e.g, {\tt C:{\bs}boost\_1\_72\_0{\bs}lib64\-msvc\-14.2}
667667
\end{itemize}
668+
669+
\item Download and install CMake for Windows (https://cmake.org/download/). Visual Studio Community Edition 2019 or later supports CMake and you can install the feature 'C++ CMake Tools for Windows' instead of installing CMake as standalone program.
668670

669671
\end{enumerate}
670672

671-
%\subsubsection*{Use Visual Studio's CMake capabilities}
673+
%\subsubsection*{Visual Studio with CMake}
672674

673-
From Visual Studio 2015 onward, you can use Visual Studio's capability to parse the CMakeLists.txt in the ORE root directory.
675+
From Visual Studio 2015 and later supports CMake Projects.
676+
677+
\begin{enumerate}
678+
\item Start Visual Studio 2017 or later.
679+
\item Select "Open a local folder" from the start page or menu.
680+
\item In the dialog window, select the ORE root directory.
681+
\item Visual Studio will read the cmake presets from CMakePresets.json and the project file CMakeList.txt and configure the project.
682+
\item Once the configuration is finished and one can build the project.
683+
\item The executables are built in the subfolder {\tt /build/TARGET/CONFIGURATION/EXECUTABLE}, e.g. {\tt /build/App/Release/ore.exe}.
684+
\end{enumerate}
674685

675-
Start the development environment, e.g {\tt "C:{\bs}Program Files (x86){\bs}Microsoft Visual Studio{\bs}2019{\bs}Community{\bs}Common7{\bs}IDE{\bs}devenv.exe"} and open the CMakeLists.txt file using File, Menu, CMake...
676-
Once the file has been parsed successfully and CMake generation has been finished (observable in the output window), you can switch in the solution explorer from the file view to the projects view, where the CMake Targets View can be selected. In this view, the various target projects can be seen below "ORE Project" and be used in a similar manner as the usual VS projects.
686+
ORE is shipped with configuration and build presets using Visual Studio 2022 and the Ninja build system. Those presets are configured in the CMakePreset.json which is read by Visual Studio by default when opening the CMake project. If you want to use Visual Studio 2019 or Visual Studio 2017 instead, you would have to change the Generator in the CMakePreset.json from "Visual Studio 17 2022" to "Visual Studio 16 2019" or "Visual Studio 15 2017".
677687

678-
The executables are built in the subfolder {\tt /build/TARGET/CONFIGURATION/EXECUTABLE}, e.g. {\tt /build/App/Release/ore.exe}, the debug and launch settings are set in launch.vs.json and not in the GUI.
688+
You can switch in the solution explorer from the file view to the projects view, where the CMake Targets View can be selected. In this view, the various target projects can be seen below "ORE Project" and be used in a similar manner as the usual VS projects.
679689

680690
%\subsubsection*{Generate Visual Studio Projects with CMake}
681691
\medskip
682692

683-
Alternatively, Visual Studio project files can be auto-generated from the CMake project files.
693+
Alternatively, Visual Studio project files can be auto-generated from the CMake project files or ORE can be built with the CMake command line tool, similar to UNIX / Mac systems.
684694

685695
\begin{enumerate}
686696

687-
\item Download and install CMake for Windows (https://cmake.org/download/). Visual Studio Community Edition 2019 or later supports CMake and you can install the feature 'C++ CMake Tools for Windows' instead of installing CMake as standalone program.
688-
689697
\item Generate MSVC project files from CMake files:
690698
\begin{itemize}
691699
\item Open a Visual Studio Tools Command Prompt
@@ -710,6 +718,27 @@ \subsubsection*{Windows}
710718
\item or open the MSVC solution file {\tt build{\bs}ORE.sln} and build the entire solution with Visual Studio (again, make sure to select the correct platform in the configuration manager first).
711719
\end{enumerate}
712720

721+
\subsubsection*{Optional: Install optional dependencies with VCPKG}
722+
723+
VCPKG is an open source c++ library manager. ORE can be built optionally with ZLIB and Eigen library support.
724+
725+
For both features the libraries needed to be installed on the system. On Windows one can use the VCPKG package manager to install those dependencies:
726+
727+
\begin{itemize}
728+
\item Install vcpkg: https://vcpkg.io/en/getting-started.html
729+
\item Install dependencies with invoking the command \\
730+
\medskip
731+
{\tt vcpkg install --triplet x64-windows zlib} \\
732+
{\tt vcpkg install --triplet x64-windows eigen3} \\
733+
\medskip
734+
\end{itemize}
735+
736+
To make VCPKG visible to CMAKE, create an environment variable {\tt VCPKG\_ROOT} pointing to the root of the vcpkg directory and configure ORE with the flag {\tt -DCMAKE\_TOOLCHAIN\_FILE=\%VCPKG\_ROOT\%/scripts/buildsystems/vcpkg.cmake}.
737+
738+
To use VCPKG with Visual Studio add the toolChainFile to the configurePresets in the CMakePresets.json:
739+
740+
{\tt "toolchainFile": "\$env\{VCPKG\_ROOT\}/scripts/buildsystems/vcpkg.cmake",}
741+
713742
\subsubsection*{Unix}
714743

715744
With the 5th release we have discontinued automake support so that ORE can only be built with CMake on Unix systems, as follows.
@@ -771,17 +800,7 @@ \subsubsection*{ZLIB support}
771800

772801
To enable zlib support configure CMake with the flag {\tt -DORE\_USE\_ZLIB=ON}.
773802

774-
If zlib is not installed on the system, it can be installed on Windows with the package manager VCPKG:
775-
776-
\begin{itemize}
777-
\item Install vcpkg: https://vcpkg.io/en/getting-started.html
778-
\item Install dependencies with invoking the command \\
779-
\medskip
780-
{\tt vcpkg install --triplet x64-windows zlib} \\
781-
\medskip
782-
\end{itemize}
783-
784-
To make VCPKG visible to CMAKE in Visual studio, create an environment variable {\tt VCPKG\_ROOT} pointing to the root of the vcpkg directory and configure ORE with the flag {\tt -DCMAKE\_TOOLCHAIN\_FILE=\%VCPKG\_ROOT\%/scripts/buildsystems/vcpkg.cmake}.
803+
If zlib is not installed on the system, it can be installed on Windows with the package manager VCPKG.
785804

786805
\subsection{Python and Jupyter}\label{sec:python}
787806

0 commit comments

Comments
 (0)