We have a large C ++ project and we would like to send only the code requested by the client, thereby deleting all the code that is not needed. That is, if we have some metaprograms like:
#ifdef ENABLE_SOME_ADVANCED_FEATURE
void AdvancedCalc(int a, int b) {
}
#else
void BasicCalc(int a, int b) {
}
#endif
I would like some kind of script to pre-process the C ++ metaprograms, so if I wanted only basic calculations after running the script, the file would look like this:
void BasicCalc(int a, int b) {
}
Thus, all the code that we did not want to send was deleted.
I'm sure there should be something like this.
Update:
I think, How to get rid of ifdef in a big c project is the solution I was looking for.
user152949
source
share