c++ - How to apply a C preprocessor only to certain (#if/#endif) directives? -


i wondering if possible, , if yes how, can run c preprocessor, cpp, on c++ source file , process conditional directives #if #endif etc. other directives stay intact in output file.

i'm doing analysis on c# code , there no c# pre-processor. idea run c preprocessor on c# file , process conditionals. way example, #region directive, stay in file, cpp appears remove #region.

you might looking tool coan:

coan software engineering tool analysing preprocessor-based configurations of c or c++ source code. principal use simplify body of source code eliminating parts redundant respect specified configuration.

it's precisely designed process #if , #ifdef preprocessor lines, , remove code accordingly, has lot of other possible uses.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -