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
A PowerShell script (`build.ps1`) is provided to build HydroChrono from the command line. The steps to configure, build, and test with this script are outlined below. Alternatively, you can use the CMake GUI with Visual Studio; those instructions appear later on this page.
10
10
11
-
## Prerequisites (download/install these)
11
+
## Prerequisites
12
+
13
+
**Required:**
12
14
13
15
- Visual Studio 2022 (Desktop development with C++)
14
16
- CMake ≥ 3.18
15
-
- Project Chrono (built from source; enable Parsers and Irrlicht modules)
16
-
- HDF5 1.10.8 (CMake package)
17
-
- Eigen 3.4 (headers)
18
-
- Irrlicht 1.8.4 (if GUI)
19
-
- Python 3.12 (only for tests/docs)
17
+
- Project Chrono (built from source; enable the Parsers module at minimum)
18
+
- HDF5 (C++ libraries, any recent version with CMake config support)
19
+
20
+
**Auto-detected from Chrono** (you do not need to install these separately):
21
+
22
+
- Eigen (header-only linear algebra library, bundled or referenced by Chrono)
23
+
- Irrlicht / VSG (visualization backends, detected if Chrono was built with them)
24
+
25
+
**Optional:**
26
+
27
+
- Python 3.x (only needed for regression tests and building documentation)
28
+
- MoorDyn (mooring dynamics library, included as a git submodule -- see [MoorDyn setup](#moordyn-mooring-library) below)
20
29
21
30
## Quick build with build.ps1 (recommended)
22
31
23
32
1) Copy `build-config-example.json` to `build-config.json` and set paths:
24
33
```json
25
34
{
26
35
"ChronoDir": "C:/path/to/chrono/build/cmake",
27
-
"Hdf5Dir": "C:/path/to/hdf5/share/cmake",
28
-
"EigenDir": "C:/path/to/eigen-3.4.0",
29
-
"IrrlichtDir": "C:/path/to/irrlicht-1.8.4",
30
36
"PythonRoot": "C:/path/to/python/env"
31
37
}
32
38
```
33
39
40
+
`ChronoDir` is the only required key. Eigen, HDF5, and visualization library paths are auto-detected from Chrono's build configuration. `PythonRoot` is optional and only needed if Python isn't on your PATH.
41
+
34
42
2) From the repo root, run (first build) - use `-Verbose` for a more detailed output:
35
43
```powershell
36
44
./build.ps1 -Verbose
@@ -41,18 +49,22 @@ A PowerShell script (`build.ps1`) is provided to build HydroChrono from the comm
-`HydroChronoGUI` — GUI helpers for Irrlicht and/or VSG visualization
85
86
86
-
`configure_hydro_target(<tgt>)` centralizes: C++ standard, PIC, include dirs, Chrono links.
87
+
Each target is configured directly with C++ standard, PIC, include dirs, and Chrono links.
87
88
88
89
Key links:
89
90
90
-
-`HydroChrono` → `Chrono::Chrono_core`(+ HDF5)
91
-
-`HydroChronoGUI` → Chrono (+ `Chrono::Chrono_irrlicht` when enabled)
91
+
-`HydroChrono` → `Chrono::Chrono_core`, OpenMP, HDF5 (+ MoorDyn when enabled)
92
+
-`HydroChronoGUI` → `Chrono::Chrono_core` (+ `Chrono::Chrono_irrlicht` and/or `Chrono::Chrono_vsg` when enabled)
92
93
93
94
94
95
---
@@ -109,8 +110,8 @@ Key links:
109
110
110
111
### Tests & Demos
111
112
112
-
- If enabled, tests are added via `add_subdirectory(tests)` and `add_subdirectory(tests/regression)`
113
-
- A helper `configure_test_environment()` assembles PATH on Windows so Chrono/Irrlicht DLLs are found when tests run from the build tree
113
+
- If enabled, tests are added via `add_subdirectory(tests/regression)` and `add_subdirectory(tests/unit)`
114
+
- A helper `configure_test_environment()` assembles PATH on Windows so Chrono, HDF5, Irrlicht, VSG, and MoorDyn DLLs are found when tests run from the build tree
114
115
- Demos can be included behind `HYDROCHRONO_ENABLE_DEMOS`
0 commit comments