PhysX's foundation\PxPreprocessor.h has this check:
#if PX_WINDOWS_FAMILY
// check that exactly one of NDEBUG and _DEBUG is defined
#if !defined(NDEBUG) ^ defined(_DEBUG)
#error Exactly one of NDEBUG and _DEBUG needs to be defined!
#endif
#endif
Both NDEBUG and _DEBUG are defined for RelWithDebInfo.
NDEBUG comes from CMake's default flags, and is generally supposed to be there for RelWithDebInfo.
PhysX's
foundation\PxPreprocessor.h
has this check:Both
NDEBUG
and_DEBUG
are defined forRelWithDebInfo
.NDEBUG
comes from CMake's default flags, and is generally supposed to be there for RelWithDebInfo.https://learn.microsoft.com/en-us/cpp/c-runtime-library/debug?view=msvc-170 says
_DEBUG
is because we've passed/MTd
or/MDd
, which definitely shouldn't be the case for RelWithDebInfo. However, according to the VS GUI, we're actually passing/MD
for RelWithDebInfo, and only use/MDd
for Debug.