Enable /await opt-out so users can manually enable /await:strict. (#1015)

* Switch to using /await:strict which is binary compatible with c++20 coroutines.

* Make legacy coroutines opt-in.
This commit is contained in:
Johan Laanstra 2021-09-13 09:16:22 -07:00 коммит произвёл GitHub
Родитель 3aa0339a4f
Коммит 032effe565
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(GeneratedFilesDir)</AdditionalIncludeDirectories>
</ClCompile>
<Midl Condition="'$(CppWinRTModernIDL)' != 'false'">