From 353ade0e71de1cd20bcbed9056bac2e7c5bccdd6 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Thu, 4 Dec 2025 20:23:25 -0800 Subject: [PATCH 1/2] README: Fix some links that don't render correctly on GitHub --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9410b93..3730b3e 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ Use Cases --------- Two common use cases include -1. [Supporting output in pure procedures] for debugging purposes. -2. [Enforcing programming contracts] throughout a project via runtime checks. +1. [Supporting output in pure procedures](#supporting-output-in-pure-procedures) for debugging purposes. +2. [Enforcing programming contracts](#enforcing-programming-contracts) throughout a project via runtime checks. ### Supporting output in pure procedures Writing pure procedures communicates useful information to a compiler or a developer. From d49b66a6d4cc1a4bd3d702e1ac9f358cd1910aa3 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Thu, 4 Dec 2025 20:22:14 -0800 Subject: [PATCH 2/2] README: Add a section documenting build flags --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 3730b3e..8ac35ef 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ See the [./example](./example) subdirectory. Building and Testing -------------------- +- [General Build Knobs](#general-build-knobs) - [Cray Compiler Environment (CCE) `ftn`](#cray-compiler-environment-cce-ftn) - [GNU Compiler Collection (GCC) `gfortran`](#gnu-compiler-collection-gcc-gfortran)) - [Intel `ifx`](#intel-ifx)) @@ -86,6 +87,23 @@ Building and Testing - [LLVM `flang-new`](#llvm-flang-new) - [Numerical Algorithms Group (NAG) `nagfor`](#numerical-algorithms-group-nag-nagfor) +### General Build Knobs + +The following build-time preprocessor knobs can be used to control the behavior of Assert. +When using `fpm` to build, these boolean flags can be passed on the command-line +using syntax like: `fpm --flag "-DASSERTIONS=1"` + +* `ASSERTIONS` : Controls the whether assertions are checked/enforced at runtime. + The default is 0 (assertions disabled). Assertions can be enabled using `-DASSERTIONS=1`. + +* `ASSERT_MULTI_IMAGE`: Controls whether the library attempts to use multi-image + Fortran features (e.g. to report the image number of an assertion failure). + The default is compiler-specific. Multi-image support can be disabled using + `-DASSERT_MULTI_IMAGE=0`. + +* `ASSERT_PARALLEL_CALLBACKS`: Controls the use of a callback interface for + multi-process features. Contact us for more details. + ### Cray Compiler Environment (CCE) `ftn` Because `fpm` uses the compiler name to determine the compiler identity and because CCE provides one compiler wrapper, `ftn`, for invoking all compilers, you will