Release+Asserts equivalent when using Visual Studio on Windows?

Hello Clang developers,

Is there any way I can build a Release+Asserts build on Windows in VS?

I've used Debug builds for "sanity" checking and RelWithDebInfo for
testing large build targets.
However, now that I've spent a day debugging a simple copy-paste
mistake in RelWithDebInfo build which was assert-catchable in Debug
I think I'd prefer Release+Asserts+DebInfo or Release+Asserts over

Is there a simple way I can achieve that?
E.g. some flag to cmake?



It seems controlling assertions is disabled on cmake vs. I don't know why.
In other generators, LLVM_ENABLE_ASSERTIONS can control.


If i remember correctly, MSVC freaks out if you don't have NDEBUG
defined in Release mode.

- Michael Spencer

That's sad.

OK, is there a (simple) way to enable optimizations in the Debug mode
instead? :slight_smile: