summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFilesCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-29 15:06:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-29 15:06:30 (GMT)
commit8b3b49a010219eeba327d882e1fe38f721b6bed8 (patch)
tree095e639d4828f7a0e4e905c1f14d5fe32369e923 /Source/cmSourceFilesCommand.cxx
parent627ab62ce093d8f50ed0ba50a1dd1081165b19f1 (diff)
downloadCMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.zip
CMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.tar.gz
CMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.tar.bz2
ENH: major change, the cmMakefile now contains a master list of cmSourceFile objects, the source lists reference the list via pointers, also you can now set properties on a file, like compile flags, abstract, etc.
Diffstat (limited to 'Source/cmSourceFilesCommand.cxx')
-rw-r--r--Source/cmSourceFilesCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx
index db87a76..b582551 100644
--- a/Source/cmSourceFilesCommand.cxx
+++ b/Source/cmSourceFilesCommand.cxx
@@ -40,6 +40,14 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& args)
generated = 1;
continue;
}
+ cmSourceFile* sf = m_Makefile->GetSource(copy.c_str());
+ if(sf)
+ {
+ // if the source file is already in the makefile,
+ // then add the pointer to the source list without creating a cmSourceFile
+ m_Makefile->GetSources()[name].push_back(sf);
+ continue;
+ }
cmSourceFile file;
file.SetIsAnAbstractClass(false);
std::string path = cmSystemTools::GetFilenamePath(copy);