Commit 8b3b49a0 authored by Bill Hoffman's avatar Bill Hoffman

ENH: major change, the cmMakefile now contains a master list of cmSourceFile...

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.
parent 627ab62c
......@@ -24,23 +24,29 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("called with incorrect number of arguments");
return false;
}
bool ret = true;
std::string m = "could not find source file(s):\n";
cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j)
{
for(cmMakefile::SourceMap::iterator l = Classes.begin();
l != Classes.end(); l++)
{
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
if(sf)
{
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
if(i->GetSourceName() == (*j))
{
i->SetIsAnAbstractClass(true);
}
}
sf->SetIsAnAbstractClass(true);
}
else
{
m += *j;
m += "\n";
ret = false;
}
}
if(!ret)
{
this->SetError(m.c_str());
}
return true;
return ret;
}
......@@ -161,7 +161,11 @@ OutputBuildObjectFromSource(std::ostream& fout,
}
// Header files shouldn't have build rules.
if(source.IsAHeaderFileOnly())
{
return;
}
std::string comment = "Build ";
std::string objectFile = std::string(shortName) +
......@@ -248,14 +252,14 @@ void cmBorlandMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
command += " $(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
std::string command2 = "implib -w ";
command2 += libpath + " " + target;
const std::vector<cmSourceFile>& sources = t.GetSourceFiles();
for(std::vector<cmSourceFile>::const_iterator i = sources.begin();
const std::vector<cmSourceFile*>& sources = t.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
i != sources.end(); ++i)
{
if(i->GetSourceExtension() == "def")
if((*i)->GetSourceExtension() == "def")
{
command += "";
command += i->GetFullPath();
command += (*i)->GetFullPath();
}
}
command += "\n|\n";
......
......@@ -46,6 +46,7 @@
#include "cmForEachCommand.cxx"
#include "cmFLTKWrapUICommand.cxx"
#include "cmGetFilenameComponentCommand.cxx"
#include "cmGetSourceFilePropertyCommand.cxx"
#include "cmIfCommand.cxx"
#include "cmIncludeCommand.cxx"
#include "cmIncludeDirectoryCommand.cxx"
......@@ -64,6 +65,7 @@
#include "cmOutputRequiredFilesCommand.cxx"
#include "cmProjectCommand.cxx"
#include "cmSetCommand.cxx"
#include "cmSetSourceFilesPropertiesCommand.cxx"
#include "cmSiteNameCommand.cxx"
#include "cmSourceFilesCommand.cxx"
#include "cmSourceFilesFlagsCommand.cxx"
......@@ -113,6 +115,7 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
commands.push_back(new cmForEachCommand);
commands.push_back(new cmFLTKWrapUICommand);
commands.push_back(new cmGetFilenameComponentCommand);
commands.push_back(new cmGetSourceFilePropertyCommand);
commands.push_back(new cmIfCommand);
commands.push_back(new cmIncludeCommand);
commands.push_back(new cmIncludeDirectoryCommand);
......@@ -131,6 +134,7 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
commands.push_back(new cmOutputRequiredFilesCommand);
commands.push_back(new cmProjectCommand);
commands.push_back(new cmSetCommand);
commands.push_back(new cmSetSourceFilesPropertiesCommand);
commands.push_back(new cmSiteNameCommand);
commands.push_back(new cmSourceFilesCommand);
commands.push_back(new cmSourceFilesFlagsCommand);
......
......@@ -60,6 +60,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
"#include <ctype.h>\n"
"#include <stdio.h>\n"
"#include <string.h>\n"
"\n"
"// Forward declare test functions\n"
"\n";
......
......@@ -104,6 +104,18 @@ void cmDSPWriter::OutputDSPFile()
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)
&& (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0))
{
// check to see if the dsp is going into a sub-directory
std::string::size_type pos = l->first.rfind('/');
if(pos != std::string::npos)
{
std::string dir = m_Makefile->GetStartOutputDirectory();
dir += "/";
dir += l->first.substr(0, pos);
if(!cmSystemTools::MakeDirectory(dir.c_str()))
{
cmSystemTools::Error("Error creating directory ", dir.c_str());
}
}
this->CreateSingleDSP(l->first.c_str(),l->second);
}
}
......@@ -201,15 +213,15 @@ void cmDSPWriter::WriteDSPFile(std::ostream& fout,
std::vector<cmSourceGroup> sourceGroups = m_Makefile->GetSourceGroups();
// get the classes from the source lists then add them to the groups
std::vector<cmSourceFile> classes = target.GetSourceFiles();
for(std::vector<cmSourceFile>::iterator i = classes.begin();
std::vector<cmSourceFile*> classes = target.GetSourceFiles();
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
i != classes.end(); i++)
{
// Add the file to the list of sources.
std::string source = i->GetFullPath();
std::string source = (*i)->GetFullPath();
cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(),
sourceGroups);
sourceGroup.AddSource(source.c_str(), &(*i));
sourceGroup.AddSource(source.c_str(), *i);
}
// add any custom rules to the source groups
......@@ -785,25 +797,19 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName,
cmSystemTools::ReplaceString(line,
"EXTRA_DEFINES",
m_Makefile->GetDefineFlags());
cmSystemTools::ReplaceString(line,
"CMAKE_CXX_FLAGS_RELEASE",
m_Makefile->
GetDefinition("CMAKE_CXX_FLAGS_RELEASE"));
cmSystemTools::ReplaceString(line,
"CMAKE_CXX_FLAGS_MINSIZEREL",
m_Makefile->
GetDefinition("CMAKE_CXX_FLAGS_MINSIZEREL")
);
cmSystemTools::ReplaceString(line,
"CMAKE_CXX_FLAGS_DEBUG",
m_Makefile->
GetDefinition("CMAKE_CXX_FLAGS_DEBUG"));
cmSystemTools::ReplaceString(line,
"CMAKE_CXX_FLAGS_RELWITHDEBINFO",
m_Makefile->
GetDefinition("CMAKE_CXX_FLAGS_RELWITHDEBINFO"));
cmSystemTools::ReplaceString(line,
"CMAKE_CXX_FLAGS",
std::string flags = m_Makefile->GetDefinition("CMAKE_CXX_FLAGS_RELEASE");
flags += " -DCMAKE_INTDIR=\\\"Release\\\"";
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", flags.c_str());
flags = m_Makefile->GetDefinition("CMAKE_CXX_FLAGS_MINSIZEREL");
flags += " -DCMAKE_INTDIR=\\\"MinSizeRel\\\"";
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL", flags.c_str());
flags = m_Makefile->GetDefinition("CMAKE_CXX_FLAGS_DEBUG");
flags += " -DCMAKE_INTDIR=\\\"Debug\\\"";
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", flags.c_str());
flags = m_Makefile->GetDefinition("CMAKE_CXX_FLAGS_RELWITHDEBINFO");
flags += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\"";
cmSystemTools::ReplaceString(line,"CMAKE_CXX_FLAGS_RELWITHDEBINFO", flags.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS",
m_Makefile->
GetDefinition("CMAKE_CXX_FLAGS"));
......
......@@ -64,10 +64,10 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
// where they are created have to be added to the include path
m_Makefile->AddIncludeDirectory( outputDirectory.c_str() );
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
cmSourceFile &curr = *i;
cmSourceFile &curr = *(*i);
// if we should use the source GUI
// to generate .cxx and .h files
if (!curr.GetWrapExclude())
......@@ -139,8 +139,9 @@ void cmFLTKWrapUICommand::FinalPass()
m_Makefile->AddCustomCommand(m_WrapUserInterface[classNum].c_str(),
fluid_exe.c_str(), cxxargs, depends,
outputs, m_Target.c_str() );
cmSourceFile* sf = m_Makefile->AddSource(m_GeneratedSourcesClasses[classNum]);
m_Makefile->GetTargets()[m_Target].GetSourceFiles().push_back( m_GeneratedSourcesClasses[classNum] );
m_Makefile->GetTargets()[m_Target].GetSourceFiles().push_back( sf );
}
}
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmGetSourceFilePropertyCommand.h"
// cmSetSourceFilePropertyCommand
bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
args)
{
if(args.size() < 3 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
const char* var = args[0].c_str();
const char* file = args[1].c_str();
cmSourceFile* sf = m_Makefile->GetSource(file);
if(sf)
{
if(args[2] == "ABSTRACT")
{
m_Makefile->AddDefinition(var, sf->IsAnAbstractClass());
}
if(args[2] == "WRAP_EXCLUDE")
{
m_Makefile->AddDefinition(var, sf->GetWrapExclude());
}
if(args[2] == "FLAGS")
{
m_Makefile->AddDefinition(var, sf->GetCompileFlags());
}
}
else
{
std::string m = "Could not find source file: ";
m += file;
this->SetError(m.c_str());
return false;
}
return true;
}
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmGetSourceFilePropertyCommand_h
#define cmGetSourceFilePropertyCommand_h
#include "cmStandardIncludes.h"
#include "cmCommand.h"
class cmGetSourceFilePropertyCommand : public cmCommand
{
public:
virtual cmCommand* Clone()
{
return new cmGetSourceFilePropertyCommand;
}
/**
* This is called when the command is first encountered in
* the input file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "GET_SOURCE_FILE_PROPERTY";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
{
return "Set attributes for a specific list of files.";
}
/**
* Longer documentation.
*/
virtual const char* GetFullDocumentation()
{
return
"GET_SOURCE_FILE_PROPERTY(VAR file [ABSTRACT|WRAP_EXCLUDE|FLAGS]) "
"Get properties on a file. The syntax for the command is to list all the files you want "
"to change, and then provide the values you want to set next.";
}
cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand);
};
#endif
......@@ -64,12 +64,12 @@ void cmInstallFilesCommand::FinalPass()
// look for a srclist
if (m_Makefile->GetSources().find(temps) != m_Makefile->GetSources().end())
{
const std::vector<cmSourceFile> &clsList =
const std::vector<cmSourceFile*> &clsList =
m_Makefile->GetSources().find(temps)->second;
std::vector<cmSourceFile>::const_iterator c = clsList.begin();
std::vector<cmSourceFile*>::const_iterator c = clsList.begin();
for (; c != clsList.end(); ++c)
{
testf = c->GetSourceName() + ext;
testf = (*c)->GetSourceName() + ext;
// add to the result
targetSourceLists.push_back(testf);
}
......
......@@ -720,9 +720,11 @@ void cmMSDotNETGenerator::WriteConfiguration(std::ostream& fout,
<< "\t\t\tCharacterSet=\"2\">\n";
fout << "\t\t\t<Tool\n"
<< "\t\t\t\tName=\"VCCLCompilerTool\"\n"
<< "\t\t\t\tAdditionalOptions=\"" <<
m_Makefile->GetDefinition("CMAKE_CXX_FLAGS") << "\"\n";
<< "\t\t\t\tAdditionalOptions=\""
<< m_Makefile->GetDefinition("CMAKE_CXX_FLAGS")
<< " -DCMAKE_INTDIR=\\&quot;" << configName << "\\&quot;"
<< "\"\n";
fout << "\t\t\t\tAdditionalIncludeDirectories=\"";
std::vector<std::string>& includes = m_Makefile->GetIncludeDirectories();
std::vector<std::string>::iterator i = includes.begin();
......@@ -891,14 +893,14 @@ void cmMSDotNETGenerator::OutputBuildTool(std::ostream& fout,
void cmMSDotNETGenerator::OutputModuleDefinitionFile(std::ostream& fout,
const cmTarget &target)
{
std::vector<cmSourceFile> const& classes = target.GetSourceFiles();
for(std::vector<cmSourceFile>::const_iterator i = classes.begin();
std::vector<cmSourceFile*> const& classes = target.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); i++)
{
if(cmSystemTools::UpperCase(i->GetSourceExtension()) == "DEF")
if(cmSystemTools::UpperCase((*i)->GetSourceExtension()) == "DEF")
{
fout << "\t\t\t\tModuleDefinitionFile=\""
<< this->ConvertToXMLOutputPath(i->GetFullPath().c_str())
<< this->ConvertToXMLOutputPath((*i)->GetFullPath().c_str())
<< "\"\n";
return;
}
......@@ -1011,20 +1013,20 @@ void cmMSDotNETGenerator::WriteVCProjFile(std::ostream& fout,
std::vector<cmSourceGroup> sourceGroups = m_Makefile->GetSourceGroups();
// get the classes from the source lists then add them to the groups
std::vector<cmSourceFile> const& classes = target.GetSourceFiles();
for(std::vector<cmSourceFile>::const_iterator i = classes.begin();
std::vector<cmSourceFile*> const& classes = target.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); i++)
{
// Add the file to the list of sources.
std::string source = i->GetFullPath();
if(cmSystemTools::UpperCase(i->GetSourceExtension()) == "DEF")
std::string source = (*i)->GetFullPath();
if(cmSystemTools::UpperCase((*i)->GetSourceExtension()) == "DEF")
{
m_ModuleDefinitionFile = i->GetFullPath();
m_ModuleDefinitionFile = (*i)->GetFullPath();
}
cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(),
sourceGroups);
sourceGroup.AddSource(source.c_str(), &(*i));
sourceGroup.AddSource(source.c_str(), *i);
}
// add any custom rules to the source groups
......
......@@ -147,10 +147,10 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
cmMakefile::SourceMap::iterator l;
for (l= srcmap.begin() ; l!=srcmap.end() ; l++)
{
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
if (i->GetFullPath() == path)
if ((*i)->GetFullPath() == path)
{
found=true;
}
......@@ -164,7 +164,7 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
std::string incpath = *t;
incpath = incpath + "/";
incpath = incpath + path;
if (i->GetFullPath() == incpath)
if ((*i)->GetFullPath() == incpath)
{
// set the path to the guessed path
info->m_FullPath = incpath;
......@@ -272,16 +272,16 @@ void cmMakeDepend::GenerateMakefileDependencies()
for(cmTargets::const_iterator l = tgts.begin();
l != tgts.end(); l++)
{
const std::vector<cmSourceFile> &classes = l->second.GetSourceFiles();
for(std::vector<cmSourceFile>::const_iterator i = classes.begin();
const std::vector<cmSourceFile*> &classes = l->second.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); ++i)
{
if(!i->GetIsAHeaderFileOnly())
if(!(*i)->GetIsAHeaderFileOnly())
{
cmDependInformation* info =
this->GetDependInformation(i->GetFullPath().c_str());
this->GetDependInformation((*i)->GetFullPath().c_str());
this->AddFileToSearchPath(info->m_FullPath.c_str());
info->m_cmSourceFile = &*i;
info->m_cmSourceFile = *i;
this->GenerateDependInformation(info);
}
}
......
......@@ -104,6 +104,11 @@ void cmMakefile::AddDefaultCommands()
cmMakefile::~cmMakefile()
{
for(std::vector<cmSourceFile*>::iterator i = m_SourceFiles.begin();
i != m_SourceFiles.end(); ++i)
{
delete *i;
}
for(unsigned int i=0; i < m_UsedCommands.size(); i++)
{
delete m_UsedCommands[i];
......@@ -153,10 +158,10 @@ void cmMakefile::Print() const
l != m_Sources.end(); l++)
{
std::cout << " Class list named: " << l->first << std::endl;
for(std::vector<cmSourceFile>::const_iterator i = l->second.begin();
for(std::vector<cmSourceFile*>::const_iterator i = l->second.begin();
i != l->second.end(); i++)
{
i->Print();
(*i)->Print();
}
}
......@@ -361,12 +366,12 @@ cmSourceFile *cmMakefile::GetSource(const char *srclist, const char *cname)
return 0;
}
// find the class
for (std::vector<cmSourceFile>::iterator i = sl->second.begin();
for (std::vector<cmSourceFile*>::iterator i = sl->second.begin();
i != sl->second.end(); ++i)
{
if (i->GetSourceName() == cname)
if ((*i)->GetSourceName() == cname)
{
return &(*i);
return *i;
}
}
return 0;
......@@ -423,24 +428,23 @@ void cmMakefile::GenerateMakefile()
void cmMakefile::AddSource(cmSourceFile& cmfile, const char *srclist)
{
m_Sources[srclist].push_back(cmfile);
m_Sources[srclist].push_back(this->AddSource(cmfile));
}
struct FindSrcByName : std::binary_function<cmSourceFile, cmSourceFile, bool>
struct FindSrcByName : std::binary_function<cmSourceFile*, cmSourceFile*, bool>
{
public:
bool operator () (const cmSourceFile &f, const cmSourceFile &test) const
bool operator () (const cmSourceFile *f, const cmSourceFile *test) const
{
return !strcmp(f.GetSourceName().c_str(),test.GetSourceName().c_str());
return (f->GetSourceName() == test->GetSourceName());
}
};
void cmMakefile::RemoveSource(cmSourceFile& cmfile,const char *srclist)
{
std::vector<cmSourceFile> &maplist = m_Sources[srclist];
std::vector<cmSourceFile>::iterator f =
std::find_if(maplist.begin(), maplist.end(), std::bind2nd(FindSrcByName(),cmfile));
// std::vector<cmSourceFile>::iterator f = find_if(maplist.begin(), maplist.end(), matches(srclist);
std::vector<cmSourceFile*> &maplist = m_Sources[srclist];
std::vector<cmSourceFile*>::iterator f =
std::find_if(maplist.begin(), maplist.end(), std::bind2nd(FindSrcByName(),&cmfile));
if (f!=maplist.end())
{
maplist.erase(f);
......@@ -1288,3 +1292,33 @@ cmData* cmMakefile::LookupData(const char* name) const
}
}
cmSourceFile* cmMakefile::GetSource(const char* sourceName)
{
for(std::vector<cmSourceFile*>::iterator i = m_SourceFiles.begin();
i != m_SourceFiles.end(); ++i)
{
if((*i)->GetSourceName() == sourceName
|| (*i)->GetSourceName()+"."+(*i)->GetSourceExtension() == sourceName)
{
return *i;
}
}
return 0;
}
cmSourceFile* cmMakefile::AddSource(cmSourceFile const&sf)
{
// check to see if it exists
cmSourceFile* ret = this->GetSource(sf.GetSourceName().c_str());
if(ret && ret->GetSourceExtension() == sf.GetSourceExtension())
{
return ret;
}
ret = new cmSourceFile(sf);
m_SourceFiles.push_back(ret);
return ret;
}
......@@ -401,10 +401,17 @@ public:
/**
* Return a list of source files in this makefile.
*/
typedef std::map<cmStdString,std::vector<cmSourceFile> > SourceMap;
typedef std::map<cmStdString,std::vector<cmSourceFile*> > SourceMap;
const SourceMap &GetSources() const {return m_Sources;}
SourceMap &GetSources() {return m_Sources;}
cmSourceFile *GetSource(const char *srclist, const char *sourceName);
cmSourceFile* GetSource(const char *srclist, const char *sourceName);
/** Get a cmSourceFile pointer for a given source name, if the name is
* not found, then a null pointer is returned.
*/
cmSourceFile* GetSource(const char* sourceName);
///! Add a new cmSourceFile to the list of sources for this makefile.
cmSourceFile* AddSource(cmSourceFile const&);
/**
* Obtain a list of auxiliary source directories.
......@@ -533,6 +540,8 @@ protected:
// libraries, classes, and executables
cmTargets m_Targets;
SourceMap m_Sources;
std::vector<cmSourceFile*> m_SourceFiles;
std::vector<std::string> m_SubDirectories; // list of sub directories
struct StringSet : public std::set<cmStdString>
......
......@@ -445,14 +445,14 @@ void cmNMakeMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
command += linklibs.str();
delete [] linklibs.str();
const std::vector<cmSourceFile>& sources = t.GetSourceFiles();
for(std::vector<cmSourceFile>::const_iterator i = sources.begin();
const std::vector<cmSourceFile*>& sources = t.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
i != sources.end(); ++i)
{
if(i->GetSourceExtension() == "def")
if((*i)->GetSourceExtension() == "def")
{
command += "/DEF:";
command += i->GetFullPath();
command += (*i)->GetFullPath();
}
}
......
......@@ -60,10 +60,10 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("bad source list passed to QTWrapCPPCommand");
return false;
}
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
cmSourceFile &curr = *i;
cmSourceFile &curr = *(*i);
// if we should wrap the class
if (!curr.GetWrapExclude())
{
......
......@@ -61,10 +61,10 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args)
this->SetError("bad source list passed to QTWrapUICommand");
return false;
}
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
cmSourceFile &curr = *i;
cmSourceFile &curr = *(*i);
// if we should wrap the class
if (!curr.GetWrapExclude())
{
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmSetSourceFilesPropertiesCommand.h"
// cmSetSourceFilesPropertiesCommand
bool cmSetSourceFilesPropertiesCommand::InitialPass(std::vector<std::string> const&
args)
{
if(args.size() < 2 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
std::vector<std::string>::const_iterator j;
// first collect up all the flags that need to be set on the file
bool abstract = false;
bool wrap_exclude = false;
bool generated = false;
std::string flags;
for(j= args.begin(); j != args.end();++j)
{
if(*j == "ABSTRACT")
{
abstract = true;
}
else if(*j == "WRAP_EXCLUDE")
{
wrap_exclude = true;
}
else if(*j == "GENERATED")