The -DCO_ASYNC_DEBUG=ON is an option for cmake, not a macro flag for the compiler.
When -DCO_ASYNC_DEBUG=ON defined, cmake will define a macro -DCO_ASYNC_DEBUG=1 for the compiler.
If you are not using cmake, you will use -DCO_ASYNC_DEBUG=1 instead.
p.s.: when #if got a undefined macro, it's regarded as 0, which works same like ifdef.
The
-DCO_ASYNC_DEBUG=ON
is an option for cmake, not a macro flag for the compiler. When-DCO_ASYNC_DEBUG=ON
defined, cmake will define a macro-DCO_ASYNC_DEBUG=1
for the compiler. If you are not using cmake, you will use-DCO_ASYNC_DEBUG=1
instead. p.s.: when#if
got a undefined macro, it's regarded as 0, which works same like ifdef.