summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceGroup.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-04-27 18:51:43 (GMT)
committerBrad King <brad.king@kitware.com>2001-04-27 18:51:43 (GMT)
commit2f42d7ffcb541979059715c6373f1d6f12044f5a (patch)
tree3663b73fb9c1352bd2a188a1392cced36f74f4dc /Source/cmSourceGroup.cxx
parent9020fec9a9b975c2a22917da686700dd9227004f (diff)
downloadCMake-2f42d7ffcb541979059715c6373f1d6f12044f5a.zip
CMake-2f42d7ffcb541979059715c6373f1d6f12044f5a.tar.gz
CMake-2f42d7ffcb541979059715c6373f1d6f12044f5a.tar.bz2
BUG: Removed output of dual rules for source files that are processed by both the compiler and by a custom command. Also removed generation of duplicate CMakeLists.txt in the project files.
Diffstat (limited to 'Source/cmSourceGroup.cxx')
-rw-r--r--Source/cmSourceGroup.cxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 24d56ab..49b2bd7 100644
--- a/Source/cmSourceGroup.cxx
+++ b/Source/cmSourceGroup.cxx
@@ -57,8 +57,7 @@ cmSourceGroup::cmSourceGroup(const char* name, const char* regex):
cmSourceGroup::cmSourceGroup(const cmSourceGroup& r):
m_Name(r.m_Name),
m_GroupRegex(r.m_GroupRegex),
- m_Sources(r.m_Sources),
- m_CustomCommands(r.m_CustomCommands)
+ m_BuildRules(r.m_BuildRules)
{
}
@@ -73,6 +72,21 @@ bool cmSourceGroup::Matches(const char* name)
/**
+ * Add a source to the group that the compiler will know how to build.
+ */
+void cmSourceGroup::AddSource(const char* name)
+{
+ BuildRules::iterator s = m_BuildRules.find(name);
+ if(s == m_BuildRules.end())
+ {
+ // The source was not found. Add it with no commands.
+ m_BuildRules[name];
+ return;
+ }
+}
+
+
+/**
* Add a source and corresponding custom command to the group. If the
* source already exists, the command will be added to its set of commands.
* If the command also already exists, the given dependencies and outputs
@@ -80,13 +94,13 @@ bool cmSourceGroup::Matches(const char* name)
*/
void cmSourceGroup::AddCustomCommand(const cmCustomCommand &cmd)
{
- CustomCommands::iterator s = m_CustomCommands.find(cmd.GetSourceName());
- if(s == m_CustomCommands.end())
+ BuildRules::iterator s = m_BuildRules.find(cmd.GetSourceName());
+ if(s == m_BuildRules.end())
{
// The source was not found. Add it with this command.
- m_CustomCommands[cmd.GetSourceName()][cmd.GetCommand()].
+ m_BuildRules[cmd.GetSourceName()][cmd.GetCommand()].
m_Depends.insert(cmd.GetDepends().begin(),cmd.GetDepends().end());
- m_CustomCommands[cmd.GetSourceName()][cmd.GetCommand()].
+ m_BuildRules[cmd.GetSourceName()][cmd.GetCommand()].
m_Outputs.insert(cmd.GetOutputs().begin(),cmd.GetOutputs().end());
return;
}