mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
NMake: Check nmake version for support of UTF-8
NMake version 9 and above support UTF-8 encoded makefiles with a BOM.
This commit is contained in:
@@ -63,11 +63,18 @@ bool cmGlobalNMakeMakefileGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
"Program Maintenance Utility Version ([1-9][0-9.]+)");
|
||||
if (regex.find(err)) {
|
||||
this->NMakeVersion = regex.match(1);
|
||||
this->CheckNMakeFeatures();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void cmGlobalNMakeMakefileGenerator::CheckNMakeFeatures()
|
||||
{
|
||||
this->NMakeSupportsUTF8 = !cmSystemTools::VersionCompare(
|
||||
cmSystemTools::OP_LESS, this->NMakeVersion.c_str(), "9");
|
||||
}
|
||||
|
||||
void cmGlobalNMakeMakefileGenerator::GetDocumentation(
|
||||
cmDocumentationEntry& entry)
|
||||
{
|
||||
|
@@ -55,8 +55,10 @@ protected:
|
||||
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
|
||||
|
||||
private:
|
||||
bool NMakeSupportsUTF8 = false;
|
||||
std::string NMakeVersion;
|
||||
bool FindMakeProgram(cmMakefile* mf) override;
|
||||
void CheckNMakeFeatures();
|
||||
|
||||
void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
|
||||
const char* envVar) const override;
|
||||
|
Reference in New Issue
Block a user