summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNMakeMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-28 17:14:31 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-05 14:56:49 (GMT)
commit186c9bff5342c1e8e73fce9cf361b6de5dda3f28 (patch)
treed0872a89c61feff3b726b9d1d45bebcbbd2989a3 /Source/cmGlobalNMakeMakefileGenerator.cxx
parent8a4f536be664c0ef6d79c2bf7fd547355ae59c81 (diff)
downloadCMake-186c9bff5342c1e8e73fce9cf361b6de5dda3f28.zip
CMake-186c9bff5342c1e8e73fce9cf361b6de5dda3f28.tar.gz
CMake-186c9bff5342c1e8e73fce9cf361b6de5dda3f28.tar.bz2
NMake: Check nmake version for support of UTF-8
NMake version 9 and above support UTF-8 encoded makefiles with a BOM.
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.cxx')
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx
index cbcd4b3..313f39b 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.cxx
+++ b/Source/cmGlobalNMakeMakefileGenerator.cxx
@@ -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)
{