diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e2677fed..731c6a4a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" $target_version = "999.999.999.999" - $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version" + $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,CppWinRTEnableAllWarnings=true" if ("${{ matrix.compiler }}" -eq "clang-cl") { $props += ",Clang=1,PlatformToolset=ClangCl" } else { @@ -146,7 +146,7 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" $target_version = "999.999.999.999" - $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version" + $props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,CppWinRTEnableAllWarnings=true" if ("${{ matrix.compiler }}" -eq "clang-cl") { $props += ",Clang=1,PlatformToolset=ClangCl" } else { @@ -315,7 +315,7 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" $target_version = "999.999.999.999" - Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,PlatformToolset=v145" + Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,CppWinRTEnableAllWarnings=true,PlatformToolset=v145" - name: Restore nuget packages run: | @@ -364,7 +364,7 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" $target_version = "999.999.999.999" - Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,PlatformToolset=${{ matrix.toolchain.platform_toolset }}" + Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,CppWinRTEnableAllWarnings=true,PlatformToolset=${{ matrix.toolchain.platform_toolset }}" - name: Restore nuget packages run: | diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 000000000..a7de1e4e1 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,10 @@ + + + + + EnableAllWarnings + false + + + + diff --git a/cppwinrt/cppwinrt.vcxproj b/cppwinrt/cppwinrt.vcxproj index 3efa7a64c..1aeafd0d9 100644 --- a/cppwinrt/cppwinrt.vcxproj +++ b/cppwinrt/cppwinrt.vcxproj @@ -176,7 +176,7 @@ Disabled ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreadedDebug - Level4 + EnableAllWarnings true @@ -195,7 +195,7 @@ Disabled ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreadedDebug - Level4 + EnableAllWarnings true @@ -214,7 +214,7 @@ Disabled ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreadedDebug - Level4 + EnableAllWarnings true @@ -236,7 +236,7 @@ ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreaded Guard - Level4 + EnableAllWarnings true @@ -261,7 +261,7 @@ ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreaded Guard - Level4 + EnableAllWarnings true @@ -286,7 +286,7 @@ ..\inc;$(OutputPath);$(WinMDPackageDir); MultiThreaded Guard - Level4 + EnableAllWarnings true