I have a VS2019 C++ project environment where a plug-in adds CPP items to the build list. Unfortunately these items inherit the global CPP build settings. Specifically the precompiled header setting. I have to manually alter the settings for these items and I think there must be a way to add a few lines to the project to filter for these items. The items all have the substring _xxx added so if I had file blah.blob the plug in inserts blah_xxx.cpp and adds it to the ClCompile itemlist.
I want to do something like
<ItemGroup
<Clcompile Condition="%(ClCompile)" contains "_xxx" >
%(ClCompile.PreCompiledHeaders)="NotUsing" </ClCompile>
</ItemGroup>
I think if I stick this late enough in the project it will have the desired effect. I suppose I could also alter the properties, but I think most props files are injected before the project behavior, so this item change needs to be in the project, or injected as a task that occurs prior to ClCompile.
I think I will eventually stumble on the answer, but figure the MSBUILD gurus could provide some direction. I have the Inside the Microsoft Build Engine book, and while a terrific resource, I'm always struggling a bit to get to the solution I want.