Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setting of IntDir MSBuild property #1471

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

DefaultRyan
Copy link
Member

Building cppwinrt was generating a bunch of warnings like

(CreateRecipeFile target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(2566,5)
: warning : Remote deployment might be slow/inefficient. Could not find a part of the path 'E:\GitHub\cppwinrt\fast_fwd
\x64\Release\cppwinrt_fast_forwarder.lib.recipe'. [E:\GitHub\cppwinrt\fast_fwd\fast_fwd.vcxproj]

I tracked this down to us setting IntDir too late in Directory.Build.targets, which was too late, and processed after a bunch of other logic. The result of this was that IntDir got the default value, which was then used for IntDirFullPath, and then we overrode IntDir.

Some MSBuild *.Targets would then use the inconsistent IntDirFullPath and complain about folder not being created.

To fix this, we now set both OutDir and IntDir consistently, in Directory.Build.Props. Since this left Directory.Build.Targets empty, I'm deleting it.

(Also, the old code was using OutDir to set IntDir, and the official docs say "Don't Do That", so we've also got that, which is nice)

With all that build spew going away, it should be easier to see the actual warnings we care about.

@DefaultRyan DefaultRyan requested a review from Scottj1s January 28, 2025 23:23
@DefaultRyan DefaultRyan merged commit f2a7ffb into master Jan 29, 2025
75 checks passed
@DefaultRyan DefaultRyan deleted the user/defaultryan/intdir branch January 29, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants