summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorJustin Goshi <jgoshi@microsoft.com>2018-08-03 20:53:08 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-09 15:03:10 (GMT)
commitb7e7718a38194879a43bce580ad5e831621ded91 (patch)
tree5bbbec7bb4e866d2903f1a1ebd7858d7fd4cc0bc /Source/cmcmd.cxx
parentce309b624aaa756c802a3dfc581c410578f77d3b (diff)
downloadCMake-b7e7718a38194879a43bce580ad5e831621ded91.zip
CMake-b7e7718a38194879a43bce580ad5e831621ded91.tar.gz
CMake-b7e7718a38194879a43bce580ad5e831621ded91.tar.bz2
MSVC: Fix manifest resource encoding
When using the Ninja or Makefile generator with MSVC on Windows we invoke the resource compiler (`rc.exe`) to compile a manifest resource. CMake generates the file with UTF-8 encoding so we need to add a pragma to inform the resource compiler.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 0a75e77..2fd1a84 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1775,6 +1775,8 @@ int cmVSLink::LinkIncremental()
if (!fout) {
return -1;
}
+ // Insert a pragma statement to specify utf-8 encoding.
+ fout << "#pragma code_page(65001)\n";
fout << this->Type
<< " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ "
"24 /* RT_MANIFEST */ \""