C++20 modules and assert macros

I am playing around with modules and porting some code, and I've run into some fun assert macros! I am trying to avoid using headers, but all other options seem to have issues unless I'm mistaken.

Classical header include will work, but I'm using modules to not have to do that.

module;
#include <cassert>
module MyModule;

void foo()
{
    assert(1 + 2 == 3);
}

Header unit might work, but I remember reading that global macros such as _DEBUG and NDEBUG having effect on those headers is implementation defined, although I can't find where I've read that ¯\_(ツ)_/¯

module MyModule;
import <cassert>

void foo()
{
    assert(1 + 2 == 3);
}

Implement assert as a function that is empty in a release build could work, but that relies on compiler optimizations to remove the expression from which the result is not used.

module MyModule;
import MyAssert;

void foo()
{
    myAssert(1 + 2 == 3);
    myAssert(/* some complicated math involving matrix classes or something */);
}

So what do you guys think is the best option here? Is there a nice solution to using assert with modules? Have I misinterpreted or overlooked anything?

Edit: I just remembered contracts (which sadly didn't make it in yet), which would solve the issue in the long run.