+48
−0
Loading
This commit adds CMake build support for the SWMM coupling feature,
migrating from the v1 Makefile-based build system.
Changes (CMakeLists.txt):
- Add TRITON_ENABLE_SWMM CMake option (default: OFF)
- Search for SWMM headers (swmm5.h) and library (libswmm5/swmm)
- Support multiple SWMM installation locations:
* SWMM_ROOT_DIR environment variable
* System paths (/usr/local, /usr)
* Relative path: ../Stormwater-Management-Model
- Add -DTRITON_SWMM compile flag when enabled
- Link against SWMM library when enabled
- Fatal error if SWMM requested but not found
Usage:
cmake -DTRITON_ENABLE_SWMM=ON ..
make
Or with explicit paths:
cmake -DTRITON_ENABLE_SWMM=ON \
-DSWMM_INCLUDE_DIR=/path/to/swmm/include \
-DSWMM_LIBRARY_DIR=/path/to/swmm/lib \
..
make