mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 05:26:58 +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.]+)");
|
"Program Maintenance Utility Version ([1-9][0-9.]+)");
|
||||||
if (regex.find(err)) {
|
if (regex.find(err)) {
|
||||||
this->NMakeVersion = regex.match(1);
|
this->NMakeVersion = regex.match(1);
|
||||||
|
this->CheckNMakeFeatures();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmGlobalNMakeMakefileGenerator::CheckNMakeFeatures()
|
||||||
|
{
|
||||||
|
this->NMakeSupportsUTF8 = !cmSystemTools::VersionCompare(
|
||||||
|
cmSystemTools::OP_LESS, this->NMakeVersion.c_str(), "9");
|
||||||
|
}
|
||||||
|
|
||||||
void cmGlobalNMakeMakefileGenerator::GetDocumentation(
|
void cmGlobalNMakeMakefileGenerator::GetDocumentation(
|
||||||
cmDocumentationEntry& entry)
|
cmDocumentationEntry& entry)
|
||||||
{
|
{
|
||||||
|
@@ -55,8 +55,10 @@ protected:
|
|||||||
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
|
void PrintBuildCommandAdvice(std::ostream& os, int jobs) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool NMakeSupportsUTF8 = false;
|
||||||
std::string NMakeVersion;
|
std::string NMakeVersion;
|
||||||
bool FindMakeProgram(cmMakefile* mf) override;
|
bool FindMakeProgram(cmMakefile* mf) override;
|
||||||
|
void CheckNMakeFeatures();
|
||||||
|
|
||||||
void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
|
void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
|
||||||
const char* envVar) const override;
|
const char* envVar) const override;
|
||||||
|
Reference in New Issue
Block a user