summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-12-29 22:11:50 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-09 21:00:39 (GMT)
commit98f2143305b8b8c5ce08dfa38ee79750696865a6 (patch)
tree3997bb25e7b426e6c5b1f69256671cd584be40fe /Source
parent2da3ae3bf76def94d3177f963703e3672ee27f1c (diff)
downloadCMake-98f2143305b8b8c5ce08dfa38ee79750696865a6.zip
CMake-98f2143305b8b8c5ce08dfa38ee79750696865a6.tar.gz
CMake-98f2143305b8b8c5ce08dfa38ee79750696865a6.tar.bz2
cmTarget: Enforce TYPE being a read-only property
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ee4ff39..9261ca8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -858,6 +858,12 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
return;
}
+ if (prop == "TYPE") {
+ std::ostringstream e;
+ e << "TYPE property is read-only\n";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return;
+ }
if (prop == "EXPORT_NAME" && this->IsImported()) {
std::ostringstream e;
e << "EXPORT_NAME property can't be set on imported targets (\""