diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-06-20 15:23:47 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-06-20 15:23:47 (GMT) |
commit | e9e312b4418b73f479073865147c4e19b9dacee0 (patch) | |
tree | 43d9c047f57128cb7c00f7992786b3edae4e3039 /Source | |
parent | c21ad6298731ae7d1d7534ad9dc078fee5884dab (diff) | |
download | CMake-e9e312b4418b73f479073865147c4e19b9dacee0.zip CMake-e9e312b4418b73f479073865147c4e19b9dacee0.tar.gz CMake-e9e312b4418b73f479073865147c4e19b9dacee0.tar.bz2 |
minor perf improvement
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files 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()) { |