From a394c9416de7c2e56efb762a30ee89da769f5ca7 Mon Sep 17 00:00:00 2001 From: "Werner, Joerg" Date: Thu, 20 Oct 2022 15:59:24 +0200 Subject: cmGlobalVisualStudioGenerator: Fix compiling as C++20 in VS 2022 Adding missing narrow string conversion. This backports commit f3c918ef1b (cmGlobalVisualStudioGenerator: Fix compiling as C++20 in VS 2022, 2022-10-20, v3.25.0-rc3~31^2) to the CMake 3.23 and 3.24 branches. Fixes: #24162 --- Source/cmGlobalVisualStudioGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 141b5ebf26..57ced0fffd 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -630,7 +630,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile, RegCloseKey(hsubkey); } else { - std::cout << "error opening subkey: " << subkeyname << std::endl; + std::cout << "error opening subkey: " + << cmsys::Encoding::ToNarrow(subkeyname) << std::endl; std::cout << std::endl; } -- cgit v1.2.1