- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's it possible for the code to find out the name of the build configuration that's being used. I know I can #ifdef NDEBUG to detect of this build is the debug one or not, but what if there was a third configuration. It's there some way the code could get the name of the configuration as a string. I.e "debug" or "release", etc.? Many thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just use
#ifdef DEBUG
const char Configuration[] = "Debug";
#endif
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When there will be a third configuration there will be a third name. But all that will not help you much: each of the parameters collected under a configuration can be changed without getting a note via a #defined value.
You may #define your own names for each configuration, there is room for that in the build settings.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just use
#ifdef DEBUG
const char Configuration[] = "Debug";
#endif
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then the else-part will be executed. But as you know, there is no third configuration.
Bob