diff options
author | Brad King <brad.king@kitware.com> | 2021-04-28 17:14:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-05 14:56:49 (GMT) |
commit | 186c9bff5342c1e8e73fce9cf361b6de5dda3f28 (patch) | |
tree | d0872a89c61feff3b726b9d1d45bebcbbd2989a3 /Source/cmGlobalNMakeMakefileGenerator.cxx | |
parent | 8a4f536be664c0ef6d79c2bf7fd547355ae59c81 (diff) | |
download | CMake-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.cxx | 7 |
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) { |