Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions nuget/CppWinrtRules.Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,9 @@
Description="Enables or disables the default for copying binaries to the output folder to be false"
Category="General" />

<BoolProperty Name="CppWinRTEnableLegacyCoroutines"
DisplayName="Enable legacy coroutines (C++17)"
Description="Enables the /await compiler option (disable this if you want to pass this yourself)"
Category="General" />

</Rule>
2 changes: 1 addition & 1 deletion nuget/Microsoft.Windows.CppWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ $(XamlMetaDataProviderPch)
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<AdditionalOptions Condition="'%(ClCompile.LanguageStandard)' == 'stdcpp17'">%(AdditionalOptions) /await</AdditionalOptions>
<AdditionalOptions Condition="'%(ClCompile.LanguageStandard)' == 'stdcpp17' And '$(CppWinRTEnableLegacyCoroutines)' != 'false'">%(AdditionalOptions) /await</AdditionalOptions>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just remove this, or does this affect existing projects?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it entirely could affect projects which relied on the implicit addition of /await.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, the logic is just throwing me but then msbuild has never made sense to me.

<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(GeneratedFilesDir)</AdditionalIncludeDirectories>
</ClCompile>
<Midl Condition="'$(CppWinRTModernIDL)' != 'false'">
Expand Down