We have custom Domain Specific Language (DSL) files in our Visual Studio solutions.
We have a code generator that parses these files, and generates C++ code from them at build time (the code generator is implemented in C++ as well, and built in the same solution, in a project that's built earlier in the build process).
We have a custom build rule for our DSL files, and each DSL file generates 2 C++ source files, one with batch-code only, the other with UI-code using the batch-code one. All those generated files are referenced in two separate projects built later on.
All the above is working fine, except in incremental builds... Our DSL files #include other helper DSL files, and when you modify one of these helper files, the top-level DSL files using them are not regenerated as they should be, since VS doesn't know how to extract dependency info of our custom DSL, and thus only check timestamps on the top-level DSL source file. This situation leads to unreliable incremental builds, weird build or runtime failures, etc... Not good :(
So my question is: How can I teach Visual Studio to recognize the actual dependencies of our DSL files?
Ideally it would be transparent and would just work, but it that isn't possible, I'd be more than happy to hear about a technique that edits the .vcproj files, injecting the actual dependencies of each DSL file semi-automatically.
As probably obvious, this is all un-managed C++ code and projects/solutions, so we probably can't use msbuild. I would love to find out how to finally fix this issue. Thanks for any input. --DD