From 2bab472ecb2e5be31ea41e4035c3e4923b42c57c Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 16 Apr 2013 16:02:47 +0200 Subject: [PATCH] VS10: add detailed comment about MIDL processing --- Source/cmVisualStudio10TargetGenerator.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1cb9f2370..e4c508c48 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1579,6 +1579,21 @@ void cmVisualStudio10TargetGenerator:: WriteMidlOptions(std::string const& /*config*/, std::vector const & includes) { + // This processes *any* of the .idl files specified in the project's file + // list (and passed as the item metadata %(Filename) expressing the rule + // input filename) into output files at the per-config *build* dir + // ($(IntDir)) each. + // + // IOW, this MIDL section is intended to provide a fully generic syntax + // content suitable for most cases (read: if you get errors, then it's quite + // probable that the error is on your side of the .idl setup). + // + // Also, note that the marked-as-generated _i.c file in the Visual Studio + // generator case needs to be referred to as $(IntDir)\foo_i.c at the + // project's file list, otherwise the compiler-side processing won't pick it + // up (for non-directory form, it ends up looking in project binary dir + // only). Perhaps there's something to be done to make this more automatic + // on the CMake side? this->WriteString("\n", 2); this->OutputIncludes(includes); this->WriteString("$(IntDir)\n", 3);