From e219527a72e0f52308805b4c16f8f51d7678cca7 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Tue, 2 Jun 2020 12:46:07 -0700 Subject: VS: Use StdOutEncoding for VS 16.7 Preview 3 and above VS 16.6 added a `StdOutEncoding` setting for custom commands to tell MSBuild that the output is encoded as UTF-8. In commit bc877a7e94 (Add support to indicate UTF-8 custom command pipe output encoding, 2020-04-08) CMake learned to add the setting in anticipation of the VS 16.6 release. However, when 16.6 was released it had a bug in the implementation of custom tasks with StdOutEncoding enabled that was exposed by our test suite. In commit 5058fb5401 (VS: Drop StdOutEncoding with VS 16.6 pending investigation, 2020-05-29) we disabled the setting pending investigation. The problem is fixed in VS 16.7 Preview 3, so restore use of the setting when a VS instance of at least that version is detected. Fixes: #20769 --- Source/cmGlobalVisualStudioVersionedGenerator.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.h') diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h index bcf8546131..cbd3ba77cb 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.h +++ b/Source/cmGlobalVisualStudioVersionedGenerator.h @@ -34,6 +34,8 @@ public: bool IsDefaultToolset(const std::string& version) const override; std::string GetAuxiliaryToolset() const override; + bool IsStdOutEncodingSupported() const override; + protected: cmGlobalVisualStudioVersionedGenerator( VSVersion version, cmake* cm, const std::string& name, -- cgit v1.2.1