summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-02-26 16:49:50 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-03-09 16:09:24 (GMT)
commit9af6e2e7b2940d5ba4d138f0df5950a675ec41c0 (patch)
treeed6741d332a8c57fe1d1dab37292a842b516cedd /Source/cmGlobalNinjaGenerator.h
parent4250c5f91b67a84318c31485a2ab36ab64967f21 (diff)
downloadCMake-9af6e2e7b2940d5ba4d138f0df5950a675ec41c0.zip
CMake-9af6e2e7b2940d5ba4d138f0df5950a675ec41c0.tar.gz
CMake-9af6e2e7b2940d5ba4d138f0df5950a675ec41c0.tar.bz2
Ninja: Use new wincodepage tool to determine encoding
Ninja 1.11 and later uses UTF-8 on Windows when possible, and includes a tool that reports the code page in use. Use this tool to determine what encoding to write the Ninja files in. Fixes: #21866
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 0c919ef..9f31708 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -388,6 +388,7 @@ public:
{
return "1.10.2";
}
+ static std::string RequiredNinjaVersionForCodePage() { return "1.11"; }
bool SupportsConsolePool() const;
bool SupportsImplicitOuts() const;
bool SupportsManifestRestat() const;
@@ -474,6 +475,7 @@ private:
std::string GetEditCacheCommand() const override;
bool FindMakeProgram(cmMakefile* mf) override;
void CheckNinjaFeatures();
+ void CheckNinjaCodePage();
bool CheckLanguages(std::vector<std::string> const& languages,
cmMakefile* mf) const override;
bool CheckFortran(cmMakefile* mf) const;
@@ -568,6 +570,9 @@ private:
bool NinjaSupportsUnconditionalRecompactTool = false;
bool NinjaSupportsMultipleOutputs = false;
bool NinjaSupportsMetadataOnRegeneration = false;
+ bool NinjaSupportsCodePage = false;
+
+ codecvt::Encoding NinjaExpectedEncoding = codecvt::None;
bool DiagnosedCxxModuleSupport = false;