From 2cd192df977371e99be518f34b8e7387d05bea12 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Wed, 20 Mar 2024 10:54:23 -0700 Subject: [PATCH] Turn assertions on by default Co-authored-by: Dan Bonachea --- src/caffeine/caffeine_assert/caffeine_assert_m.F90 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/caffeine/caffeine_assert/caffeine_assert_m.F90 b/src/caffeine/caffeine_assert/caffeine_assert_m.F90 index a141cb32d..8a97ffa37 100644 --- a/src/caffeine/caffeine_assert/caffeine_assert_m.F90 +++ b/src/caffeine/caffeine_assert/caffeine_assert_m.F90 @@ -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