简体   繁体   中英

Android Studio NDK release/debug defines

How can I specify a define for the debug build only?

How can I specify a define for the release build only?

NDEBUG gets defined when it's a Release build, so you can use that.

Eg

#ifdef NDEBUG
#define RELEASE_BUILD
#else
#define DEBUG_BUILD
#endif

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM