From e9e312b4418b73f479073865147c4e19b9dacee0 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 20 Jun 2003 11:23:47 -0400 Subject: minor perf improvement --- Source/cmMakefile.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9fec099..9cb35e2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1020,7 +1020,8 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) { std::string name = cname; - + std::string out; + // look through all the source files that have custom commands // and see if the custom command has the passed source file as an output // keep in mind the possible .rule extension that may be tacked on @@ -1031,7 +1032,7 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) if ((*i)->GetCustomCommand()) { // is the output of the custom command match the source files name - std::string out = (*i)->GetCustomCommand()->GetOutput(); + out = (*i)->GetCustomCommand()->GetOutput(); if (out.rfind(name) != out.npos && out.rfind(name) == out.size() - name.size()) { -- cgit v0.12