Skip to content

Commit 584fc17

Browse files
authored
Merge pull request #80 from bonachea/README-flags
Document all build flags
2 parents 22da4d4 + d49b66a commit 584fc17

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Use Cases
4545
---------
4646
Two common use cases include
4747

48-
1. [Supporting output in pure procedures] for debugging purposes.
49-
2. [Enforcing programming contracts] throughout a project via runtime checks.
48+
1. [Supporting output in pure procedures](#supporting-output-in-pure-procedures) for debugging purposes.
49+
2. [Enforcing programming contracts](#enforcing-programming-contracts) throughout a project via runtime checks.
5050

5151
### Supporting output in pure procedures
5252
Writing pure procedures communicates useful information to a compiler or a developer.
@@ -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)