Build Systems
HSD-Fortran supports CMake (recommended) and fpm.
CMake
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
ctest --test-dir build --output-on-failure
cmake --install build --prefix /path/to/install
Options
Option |
Default |
Description |
|---|---|---|
|
|
Accept |
|
|
Build test suite |
|
|
Build example programs |
|
|
Enable code coverage (GCC only) |
|
|
Enable address/leak/UB sanitizers |
Debug builds automatically enable runtime checks (-fcheck=all, -fbacktrace, FPE traps, sentinel initialisation). For memory leak detection add -DHSD_SANITIZERS=ON; for coverage add -DHSD_COVERAGE=ON.
fpm
fpm build --profile debug
fpm test --profile debug
Note
fpm 0.10.x doesn’t scan subdirectories, so symlinks in test/ point to files
under test/suites/. Recreate them if new test files are added:
cd test
for f in suites/api/*.f90 suites/core/*.f90 suites/io/*.f90 suites/coverage/*.f90; do
ln -sf "$f" "$(basename $f)"
done