summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2021-09-30 21:30:06 +0300
committerBrad King <brad.king@kitware.com>2021-10-01 13:05:53 -0400
commitd6746fd05c92a8edb94de746846227e6101fc05e (patch)
tree82bf289c94a16b030776e48d5167bf34cdab6c1b /Source
parent77c237d21943363ebe17b9fefe5ef1e62fa374a1 (diff)
downloadcmake-d6746fd05c92a8edb94de746846227e6101fc05e.tar.gz
cmMakefile: Fix compilation on EDG-based compilers such as LCC
Compilers based on EDG frontend sometimes throw an internal error while using `this->` at some circumstances. While it is up to be fixed in future versions of front end, this bug still occurs in some modern compilers, such as LCC for Elbrus CPUs, and probably others (maybe ICC). It caused CMake to be unbuildable by these compilers. This patch fixes it.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a490dacc6c..83984f7a30 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3982,11 +3982,10 @@ cmValue cmMakefile::GetProperty(const std::string& prop) const
if (prop == "TESTS") {
std::vector<std::string> keys;
// get list of keys
- std::transform(this->Tests.begin(), this->Tests.end(),
- std::back_inserter(keys),
- [](decltype(this->Tests)::value_type const& pair) {
- return pair.first;
- });
+ const auto* t = this;
+ std::transform(
+ t->Tests.begin(), t->Tests.end(), std::back_inserter(keys),
+ [](decltype(t->Tests)::value_type const& pair) { return pair.first; });
output = cmJoin(keys, ";");
return cmValue(output);
}