[cmake-developers] Fragile behaviour of msbuild when using Visual Studio solution/project generators

Brad King brad.king at kitware.com
Thu Oct 22 11:43:16 EDT 2015


On 10/22/2015 10:58 AM, rleigh at codelibre.net wrote:
> The msbuild <Exec> task can use IgnoreStandardErrorWarningFormat="true" to
> suppress this behaviour.  It would probably be appropriate to enable this
> for all uses other than maybe compiling and linking.

Yes, if it is possible.

> We seem to use <CustomBuild>'s <Command> rather than <Exec>

We use that because it is what the IDE uses when creating a project file
so using it makes the command visible in the IDE properties.  It also handles
all the dependencies and such instead of always executing, and is the only
way to get proper semantics we've found.  If no setting is available then
I think the solution is "don't do that" :(

> internals of msbuild and I couldn't find any obvious documentation for
> <CustomBuild>.

I'm not very familiar with it either.  I see something that looks like a
definition of the CustomBuild target type in files like these:

 c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/Microsoft.CppCommon.targets
 c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/V110/Microsoft.CppCommon.targets
 c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/V120/Microsoft.CppCommon.targets
 c:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/V140/Microsoft.CppCommon.targets

-Brad



More information about the cmake-developers mailing list