From 3b66c0a5740482c478b48f1bd3f295bfe54a82fa Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 22 Jun 2005 09:12:05 -0400 Subject: ENH: some better checks --- Source/cmTarget.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index dfdde50..a3fb589 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -693,6 +693,12 @@ void cmTarget::SetProperty(const char* prop, const char* value) void cmTarget::UpdateLocation() { + // make sure we have a makefile + if (!m_Makefile) + { + return; + } + // set the LOCATION property of the target std::string target_location; switch( this->GetType() ) @@ -712,7 +718,7 @@ void cmTarget::UpdateLocation() } if ( target_location.size() == 0 ) { - target_location += m_Makefile->GetCurrentOutputDirectory(); + target_location += m_Makefile->GetStartOutputDirectory(); } if ( target_location.size() > 0 ) { -- cgit v0.12