You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft's Visual Studio 2022 Community Edition is available from
161
+
https://visualstudio.microsoft.com/vs/community/
162
+
163
+
C++ is required for compiling all DynAdjust binaries. MFC is only required
164
+
for building `GeoidInt.exe` - Geoid Interpolation software with a
165
+
(dialog-based) graphical user interface.
166
+
167
+
During installation, ensure C++ Desktop development and [CMake tools for Windows](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170#installation) components are installed. Full instructions for installing and using packages with CMake in Visual studio can be found [here](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-vs?pivots=shell-cmd). Below is a brief summary of the steps.
168
+
169
+
#### Install git
156
170
157
171
On Windows, you will first need to install
158
172
[git](https://gitforwindows.org).
159
173
160
-
### Install prerequisites
161
-
162
174
#### Install vcpkg
163
175
164
-
If you do not have it installed, install
165
-
[vcpkg](https://github.com/microsoft/vcpkg) using the following steps.
176
+
If you do not have [vcpkg](https://github.com/microsoft/vcpkg) installed, you can install it using the following steps.
If you do not have [Code Synthesis XSD](https://www.codesynthesis.com/products/xsd/), you can install it using the following steps:
194
+
195
+
1. Download the [Windows 10 binary package](https://www.codesynthesis.com/products/xsd/download.xhtml) (version 4.2.0). The direct link is http://www.codesynthesis.com/download/xsd/4.2/libxsd-4.2.0.tar.gz.
196
+
2. Extract the compressed binary package to a folder (e.g `C:\Tools\xsd\`).
197
+
3. Add `C:\Tools\xsd` to the system PATH environment variable.
198
+
199
+
#### Install Intel oneAPI MKL library
200
+
201
+
If you do not have it, install the [Intel oneAPI Math Kernel Library {oneMKL)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html). No extra configuration required because the installer registers MKL on the system PATH. With Visual Studio 2022 already installed, the Intel oneMKL installer
202
+
will automatically enable integration into the Visual Studio 2022 IDE.
203
+
This means that the oneAPI MKL and TBB libraries and headers will be
204
+
automatically referenced upon compiling DynAdjust without modification.
184
205
185
-
### Download the source code
206
+
### Download the DynAdjust source code
186
207
187
-
Download an official release (e.g., 1.2.8) for example this link:
208
+
Download an official release (e.g., 1.2.9) for example this link:
The project properties pages for each executable and DLL project make
378
-
use of User Macros that simplify the creation of settings for the four
379
-
configurations.
380
-
381
-
Given that many functions are shared throughout the suite of executables
382
-
and DLLs, the DynAdjust solution makes extensive use of precompiled
383
-
headers to simplify and speed up compile time.
252
+
Upon executing Visual Studio, select **Open a local folder** and navigate to the root folder where DynAdjust was extracted (above), where the top-most `CMakeLists.txt` file exists. Upon opening this folder, Visual Studio will
253
+
254
+
* Add **CMake** items to the **Project** menu, with commands for viewing and editing CMake scripts.
255
+
256
+
* Display the folder structure and files in the **Solution Explorer** .
257
+
258
+
* Run CMake and generate the CMake cache file (`CMakeCache.txt`) for the default configuration. The CMake command line is displayed in the **Output Window**, along with other output from CMake.
259
+
260
+
* Start, in the background, to index the source files to enable IntelliSense, browsing information, refactoring, and so on. As you work, Visual Studio monitors changes in the editor and also on disk to keep its index in sync with the sources.
261
+
262
+
Once CMake cache generation has succeeded, you can also view your projects organized logically by targets. Choose the **Select View** button on the **Solution Explorer** toolbar. From the list in **Solution Explorer - Views**, select **CMake Targets View** and press **Enter** to open the targets view.
263
+
264
+
The `CMakeLists.txt` file for DynAdjust manages several *executables* and dependent *dynamic link libraries (DLL)*.
265
+
266
+
The project for each *executable* is named using the convention `dna<program-name>wrapper`, except for the main program `dynadjust`.
267
+
Upon compilation, these projects will create executables named `<program-name>.exe`. Each executable named `<program-name>.exe` is
268
+
dependent on a *DLL* named `dna<program-name>.dll`. The `CMakeLists.txt` file will ensure each dependency DLL is compiled first before compiling the executables.
269
+
270
+
The `CMakePresets.json` file manages four configurations:
271
+
272
+
1. Debug version with MKL (`build-dbg-mkl`)
273
+
2. Release version with MKL (`build-rel-mkl`)
274
+
3. Debug version with OpenBLAS (`build-dbg-openblas`)
275
+
4. Release version with OpenBLAS (`build-rel-openblas`)
276
+
277
+
To build DynAdjust:
278
+
279
+
1. Select the Build Configuration you would like to build (e.g. `build-rel-mkl`)
280
+
2. From the Project Menu, select **Delete cache and reconfigure**
281
+
3. Select **Build All**, or select the executable or DLL and then **Build*
0 commit comments