diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d534a0426..4e3a34582 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3459,8 +3459,9 @@ cmTargetInternalPointer::~cmTargetInternalPointer() //---------------------------------------------------------------------------- cmTargetInternalPointer& -cmTargetInternalPointer::operator=(cmTargetInternalPointer const&) +cmTargetInternalPointer::operator=(cmTargetInternalPointer const& r) { + if(this == &r) { return *this; } // avoid warning on HP about self check // Ideally cmTarget instances should never be copied. However until // we can make a sweep to remove that, this copy constructor avoids // allowing the resources (Internals) to be copied.