summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-13 20:34:52 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-13 20:34:52 (GMT)
commit030dd4b91e4023ce73ae0c9ca675227202ed1e1b (patch)
tree4985bafb0fde619c4ba489ad0a16bb39f7a983a6
parentc09f6172a4556aed7e84492497986f63e3192e14 (diff)
downloadCMake-030dd4b91e4023ce73ae0c9ca675227202ed1e1b.zip
CMake-030dd4b91e4023ce73ae0c9ca675227202ed1e1b.tar.gz
CMake-030dd4b91e4023ce73ae0c9ca675227202ed1e1b.tar.bz2
ENH: Speedup by only getting the source once
-rw-r--r--Source/cmTarget.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 2bfe0a2..c2af5e4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -207,10 +207,14 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
// Next if one wasn't found then assume it is a single class
// check to see if it is an existing source file
- if (!done && mf.GetSource(temps.c_str()))
+ if (!done)
{
- m_SourceFiles.push_back(mf.GetSource(temps.c_str()));
- done = 1;
+ cmSourceFile* sourceFile = mf.GetSource(temps.c_str());
+ if ( sourceFile )
+ {
+ m_SourceFiles.push_back(sourceFile);
+ done = 1;
+ }
}
// if it wasn't a source file listed with the makefile