Skip to content

Commit

Permalink
Turn assertions on by default
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
  • Loading branch information
rouson and bonachea authored Mar 20, 2024
1 parent ed49ee0 commit 2cd192d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/caffeine/caffeine_assert/caffeine_assert_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ module caffeine_assert_m
private
public :: assert

#ifndef ASSERTIONS
#define ASSERTIONS .true.
#if CAF_ASSERTIONS || !defined(CAF_ASSERTIONS)
logical, parameter :: assertions_=.true.
#else
logical, parameter :: assertions_=.false.
#endif

logical, parameter :: assertions_=ASSERTIONS
!! Turn off assertions with
!! fpm test --flag "-DASSERTIONS=.false."
!! Disable assertions with
!! fpm test --flag "-DCAF_ASSERTIONS=0"

interface

Expand Down

0 comments on commit 2cd192d

Please sign in to comment.