Skip to content

Commit d49b66a

Browse files
committed
README: Add a section documenting build flags
1 parent 353ade0 commit d49b66a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,31 @@ See the [./example](./example) subdirectory.
7979
Building and Testing
8080
--------------------
8181

82+
- [General Build Knobs](#general-build-knobs)
8283
- [Cray Compiler Environment (CCE) `ftn`](#cray-compiler-environment-cce-ftn)
8384
- [GNU Compiler Collection (GCC) `gfortran`](#gnu-compiler-collection-gcc-gfortran))
8485
- [Intel `ifx`](#intel-ifx))
8586
- [LFortran `lfortran`](#lfortran-lfortran)
8687
- [LLVM `flang-new`](#llvm-flang-new)
8788
- [Numerical Algorithms Group (NAG) `nagfor`](#numerical-algorithms-group-nag-nagfor)
8889

90+
### General Build Knobs
91+
92+
The following build-time preprocessor knobs can be used to control the behavior of Assert.
93+
When using `fpm` to build, these boolean flags can be passed on the command-line
94+
using syntax like: `fpm --flag "-DASSERTIONS=1"`
95+
96+
* `ASSERTIONS` : Controls the whether assertions are checked/enforced at runtime.
97+
The default is 0 (assertions disabled). Assertions can be enabled using `-DASSERTIONS=1`.
98+
99+
* `ASSERT_MULTI_IMAGE`: Controls whether the library attempts to use multi-image
100+
Fortran features (e.g. to report the image number of an assertion failure).
101+
The default is compiler-specific. Multi-image support can be disabled using
102+
`-DASSERT_MULTI_IMAGE=0`.
103+
104+
* `ASSERT_PARALLEL_CALLBACKS`: Controls the use of a callback interface for
105+
multi-process features. Contact us for more details.
106+
89107
### Cray Compiler Environment (CCE) `ftn`
90108
Because `fpm` uses the compiler name to determine the compiler identity and because
91109
CCE provides one compiler wrapper, `ftn`, for invoking all compilers, you will

0 commit comments

Comments
 (0)