summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAbstractFilesCommand.cxx2
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx2
-rw-r--r--Source/cmBorlandMakefileGenerator.cxx2
-rw-r--r--Source/cmCreateTestSourceList.cxx4
-rw-r--r--Source/cmDSPWriter.cxx2
-rw-r--r--Source/cmFLTKWrapUICommand.cxx2
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx6
-rw-r--r--Source/cmMSDotNETGenerator.cxx2
-rw-r--r--Source/cmMakeDepend.cxx2
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx4
-rw-r--r--Source/cmQTWrapCPPCommand.cxx4
-rw-r--r--Source/cmQTWrapUICommand.cxx2
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.cxx91
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.h6
-rw-r--r--Source/cmSourceFile.cxx57
-rw-r--r--Source/cmSourceFile.h37
-rw-r--r--Source/cmSourceFilesCommand.cxx2
-rw-r--r--Source/cmTarget.cxx4
-rw-r--r--Source/cmUnixMakefileGenerator.cxx20
-rw-r--r--Source/cmVTKMakeInstantiatorCommand.cxx11
-rw-r--r--Source/cmVTKWrapJavaCommand.cxx8
-rw-r--r--Source/cmVTKWrapPythonCommand.cxx8
-rw-r--r--Source/cmVTKWrapTclCommand.cxx10
-rw-r--r--Source/cmWrapExcludeFilesCommand.cxx4
24 files changed, 158 insertions, 134 deletions
diff --git a/Source/cmAbstractFilesCommand.cxx b/Source/cmAbstractFilesCommand.cxx
index 85d2a54..a23ce54 100644
--- a/Source/cmAbstractFilesCommand.cxx
+++ b/Source/cmAbstractFilesCommand.cxx
@@ -44,7 +44,7 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
if(sf)
{
- sf->SetIsAnAbstractClass(true);
+ sf->SetProperty("ABSTRACT","1");
}
else
{
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 659cb59..6ebb035 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -69,7 +69,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
cmfile.SetName(fullname.c_str(), m_Makefile->GetCurrentDirectory(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
- cmfile.SetIsAnAbstractClass(false);
+ cmfile.SetProperty("ABSTRACT","0");
m_Makefile->AddSource(cmfile);
if (sourceListValue.size() > 0)
{
diff --git a/Source/cmBorlandMakefileGenerator.cxx b/Source/cmBorlandMakefileGenerator.cxx
index f996008..680e534 100644
--- a/Source/cmBorlandMakefileGenerator.cxx
+++ b/Source/cmBorlandMakefileGenerator.cxx
@@ -169,7 +169,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
shared = true;
}
// Header files shouldn't have build rules.
- if(source.IsAHeaderFileOnly())
+ if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
{
return;
}
diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx
index 440dbd9..a8e0c57 100644
--- a/Source/cmCreateTestSourceList.cxx
+++ b/Source/cmCreateTestSourceList.cxx
@@ -279,7 +279,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile cfile;
std::string sourceListValue;
- cfile.SetIsAnAbstractClass(false);
+ cfile.SetProperty("ABSTRACT","0");
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
m_Makefile->GetCurrentOutputDirectory(),
cmSystemTools::GetFilenameExtension(args[1]).c_str()+1,
@@ -290,7 +290,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
for(i = testsBegin; i != tests.end(); ++i)
{
cmSourceFile cfile;
- cfile.SetIsAnAbstractClass(false);
+ cfile.SetProperty("ABSTRACT","0");
cfile.SetName(i->c_str(),
m_Makefile->GetCurrentDirectory(),
m_Makefile->GetSourceExtensions(),
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx
index 54c696b..1c75223 100644
--- a/Source/cmDSPWriter.cxx
+++ b/Source/cmDSPWriter.cxx
@@ -277,7 +277,7 @@ void cmDSPWriter::WriteDSPFile(std::ostream& fout,
const char* compileFlags = 0;
if(cc->second.m_SourceFile)
{
- compileFlags = cc->second.m_SourceFile->GetCompileFlags();
+ compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
}
if (source != libName || target.GetType() == cmTarget::UTILITY)
{
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index ec6f7cf..228215c 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -64,7 +64,7 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
// if we should use the source GUI
// to generate .cxx and .h files
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile header_file;
cmSourceFile source_file;
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index df8ca49..bfd7743 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -32,15 +32,15 @@ bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
{
if(args[2] == "ABSTRACT")
{
- m_Makefile->AddDefinition(var, sf->IsAnAbstractClass());
+ m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("ABSTRACT"));
}
if(args[2] == "WRAP_EXCLUDE")
{
- m_Makefile->AddDefinition(var, sf->GetWrapExclude());
+ m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("WRAP_EXCLUDE"));
}
if(args[2] == "COMPILE_FLAGS")
{
- m_Makefile->AddDefinition(var, sf->GetCompileFlags());
+ m_Makefile->AddDefinition(var, sf->GetProperty("COMPILE_FLAGS"));
}
}
else
diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx
index 54c8c4d..c4b3862 100644
--- a/Source/cmMSDotNETGenerator.cxx
+++ b/Source/cmMSDotNETGenerator.cxx
@@ -1126,7 +1126,7 @@ void cmMSDotNETGenerator::WriteVCProjFile(std::ostream& fout,
const char* compileFlags = 0;
if(cc->second.m_SourceFile)
{
- compileFlags = cc->second.m_SourceFile->GetCompileFlags();
+ compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
}
if (source != libName || target.GetType() == cmTarget::UTILITY)
{
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx
index ab1b090..b40db88 100644
--- a/Source/cmMakeDepend.cxx
+++ b/Source/cmMakeDepend.cxx
@@ -277,7 +277,7 @@ void cmMakeDepend::GenerateMakefileDependencies()
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); ++i)
{
- if(!(*i)->GetIsAHeaderFileOnly())
+ if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
cmDependInformation* info =
this->GetDependInformation((*i)->GetFullPath().c_str(),NULL);
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index ba808f0..2637131 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -324,8 +324,10 @@ OutputBuildObjectFromSource(std::ostream& fout,
bool shared)
{
// Header files shouldn't have build rules.
- if(source.IsAHeaderFileOnly())
+ if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
+ {
return;
+ }
std::string comment = "Build ";
std::string objectFile = std::string(shortName) +
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx
index 2c9f0e1..837e153 100644
--- a/Source/cmQTWrapCPPCommand.cxx
+++ b/Source/cmQTWrapCPPCommand.cxx
@@ -65,12 +65,12 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
// if we should wrap the class
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile file;
if (curr)
{
- file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
+ file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = "moc_" + srcName;
diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx
index 8a93f6a..dd4e3a6 100644
--- a/Source/cmQTWrapUICommand.cxx
+++ b/Source/cmQTWrapUICommand.cxx
@@ -63,7 +63,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
// if we should wrap the class
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile header_file;
cmSourceFile source_file;
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx
index f065b45..a879386 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.cxx
+++ b/Source/cmSetSourceFilesPropertiesCommand.cxx
@@ -17,8 +17,8 @@
#include "cmSetSourceFilesPropertiesCommand.h"
// cmSetSourceFilesPropertiesCommand
-bool cmSetSourceFilesPropertiesCommand::InitialPass(std::vector<std::string> const&
- argsIn)
+bool cmSetSourceFilesPropertiesCommand::InitialPass(
+ std::vector<std::string> const& argsIn)
{
if(argsIn.size() < 2 )
{
@@ -28,70 +28,99 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(std::vector<std::string> con
std::vector<std::string> args;
cmSystemTools::ExpandListArguments(argsIn, args);
+ // first collect up the list of files
+ std::vector<std::string> propertyPairs;
+ bool doingFiles = true;
+ int numFiles = 0;
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)
{
+ // old style allows for specifier before PROPERTIES keyword
if(*j == "ABSTRACT")
{
- abstract = true;
+ doingFiles = false;
+ propertyPairs.push_back("ABSTRACT");
+ propertyPairs.push_back("1");
}
else if(*j == "WRAP_EXCLUDE")
{
- wrap_exclude = true;
+ doingFiles = false;
+ propertyPairs.push_back("WRAP_EXCLUDE");
+ propertyPairs.push_back("1");
}
else if(*j == "GENERATED")
{
- generated = true;
+ doingFiles = false;
+ propertyPairs.push_back("GENERATED");
+ propertyPairs.push_back("1");
}
else if(*j == "COMPILE_FLAGS")
{
+ doingFiles = false;
+ propertyPairs.push_back("COMPILE_FLAGS");
++j;
if(j == args.end())
{
- this->SetError("called with incorrect number of arguments FLAGS with no flags");
- return false;
+ this->SetError("called with incorrect number of arguments COMPILE_FLAGS with no flags");
+ return false;
}
- flags = *j;
+ propertyPairs.push_back(*j);
+ }
+ else if(*j == "PROPERTIES")
+ {
+ doingFiles = false;
+ // now loop through the rest of the arguments, new style
+ ++j;
+ while (j != args.end())
+ {
+ propertyPairs.push_back(*j);
+ ++j;
+ if(j == args.end())
+ {
+ this->SetError("called with incorrect number of arguments.");
+ return false;
+ }
+ propertyPairs.push_back(*j);
+ ++j;
+ }
+ }
+ else if (doingFiles)
+ {
+ numFiles++;
+ }
+ else
+ {
+ this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
+ return false;
}
}
+
// now loop over all the files
- for(j = args.begin(); j != args.end(); ++j)
+ int i, k;
+ for(i = 0; i < numFiles; ++i)
{
- // at the sign of the first property exit the loop
- if(*j == "ABSTRACT" || *j == "WRAP_EXCLUDE" || *j == "COMPILE_FLAGS")
- {
- break;
- }
// if the file is already in the makefile just set properites on it
- cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
+ cmSourceFile* sf = m_Makefile->GetSource(args[i].c_str());
if(sf)
{
- if(flags.size())
+ // now loop through all the props and set them
+ for (k = 0; k < propertyPairs.size(); k = k + 2)
{
- sf->SetCompileFlags(flags.c_str());
+ sf->SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
}
- sf->SetIsAnAbstractClass(abstract);
- sf->SetWrapExclude(wrap_exclude);
}
// if file is not already in the makefile, then add it
else
{
- std::string newfile = *j;
+ std::string newfile = args[i];
cmSourceFile file;
std::string path = cmSystemTools::GetFilenamePath(newfile);
- // set the flags
- file.SetIsAnAbstractClass(abstract);
- file.SetWrapExclude(wrap_exclude);
- if(flags.size())
+ // now loop through all the props and set them
+ for (k = 0; k < propertyPairs.size(); k = k + 2)
{
- file.SetCompileFlags(flags.c_str());
+ file.SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
}
- if(generated)
+ if(file.GetPropertyAsBool("GENERATED"))
{
std::string ext = cmSystemTools::GetFilenameExtension(newfile);
std::string name_no_ext = cmSystemTools::GetFilenameName(newfile.c_str());
diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h
index 15d4ed6..6a25582 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.h
+++ b/Source/cmSetSourceFilesPropertiesCommand.h
@@ -53,9 +53,9 @@ public:
virtual const char* GetFullDocumentation()
{
return
- "SET_SOURCE_FILES_PROPERTIES(file1 file2 .. filen [ABSTRACT|WRAP_EXCLUDE|GENERATED|COMPILE_FLAGS] [flags]) "
- "Set 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.";
+ "SET_SOURCE_FILES_PROPERTIES(file1 file2 .. filen PROPERTIES prop1 value1 prop2 value2 ... prop2 valuen)"
+ "Set 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. Common boolean properties ABSTRACT, WRAP_EXCLUDE, GENERATED and COMPILE_FLAGS. The first three are boolean properties (use a 1 or 0, TRUE or FALSE) while the COMPILE_FLAGS accepts any string. You can make up your own properties as well.";
}
cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand);
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 43ebf52..a6305b9 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -28,7 +28,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
const std::vector<std::string>& sourceExts,
const std::vector<std::string>& headerExts)
{
- m_HeaderFileOnly = true;
+ this->SetProperty("HEADER_FILE_ONLY","1");
m_SourceName = name;
std::string pathname = dir;
@@ -68,10 +68,11 @@ void cmSourceFile::SetName(const char* name, const char* dir,
}
// See if the file is a header file
- if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) == headerExts.end())
- m_HeaderFileOnly = false;
- else
- m_HeaderFileOnly = true;
+ if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) ==
+ headerExts.end())
+ {
+ this->SetProperty("HEADER_FILE_ONLY","0");
+ }
m_FullPath = hname;
return;
}
@@ -86,7 +87,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
if(cmSystemTools::FileExists(hname.c_str()))
{
m_SourceExtension = *ext;
- m_HeaderFileOnly = false;
+ this->SetProperty("HEADER_FILE_ONLY","0");
m_FullPath = hname;
return;
}
@@ -128,7 +129,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
void cmSourceFile::SetName(const char* name, const char* dir, const char *ext,
bool hfo)
{
- m_HeaderFileOnly = hfo;
+ this->SetProperty("HEADER_FILE_ONLY",(hfo ? "1" : "0"));
m_SourceName = name;
std::string pathname = dir;
if(pathname != "")
@@ -149,24 +150,38 @@ void cmSourceFile::SetName(const char* name, const char* dir, const char *ext,
void cmSourceFile::Print() const
{
- if(m_AbstractClass)
- {
- std::cerr << "Abstract ";
- }
- else
+ std::cerr << "m_FullPath: " << m_FullPath << "\n";
+ std::cerr << "m_SourceName: " << m_SourceName << std::endl;
+ std::cerr << "m_SourceExtension: " << m_SourceExtension << "\n";
+}
+
+void cmSourceFile::SetProperty(const char* prop, const char* value)
+{
+ if (!prop)
{
- std::cerr << "Concrete ";
+ return;
}
- if(m_HeaderFileOnly)
+ m_Properties[prop] = value;
+}
+
+const char *cmSourceFile::GetProperty(const char* prop) const
+{
+ std::map<cmStdString,cmStdString>::const_iterator i =
+ m_Properties.find(prop);
+ if (i != m_Properties.end())
{
- std::cerr << "Header file ";
+ return i->second.c_str();
}
- else
+ return 0;
+}
+
+bool cmSourceFile::GetPropertyAsBool(const char* prop) const
+{
+ std::map<cmStdString,cmStdString>::const_iterator i =
+ m_Properties.find(prop);
+ if (i != m_Properties.end())
{
- std::cerr << "CXX file ";
+ return cmSystemTools::IsOn(i->second.c_str());
}
- std::cerr << "m_CompileFlags: " << m_CompileFlags << "\n";
- std::cerr << "m_FullPath: " << m_FullPath << "\n";
- std::cerr << "m_SourceName: " << m_SourceName << std::endl;
- std::cerr << "m_SourceExtension: " << m_SourceExtension << "\n";
+ return false;
}
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 23063d2..0fb0dcd 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -34,9 +34,6 @@ public:
*/
cmSourceFile()
{
- m_AbstractClass = false;
- m_HeaderFileOnly = false;
- m_WrapExclude = false;
}
/**
@@ -61,26 +58,11 @@ public:
*/
void Print() const;
- /**
- * Indicate whether the class is abstract (non-instantiable).
- */
- bool IsAnAbstractClass() const { return m_AbstractClass; }
- bool GetIsAnAbstractClass() const { return m_AbstractClass; }
- void SetIsAnAbstractClass(bool f) { m_AbstractClass = f; }
-
- /**
- * Indicate whether the class should not be wrapped
- */
- bool GetWrapExclude() const { return m_WrapExclude; }
- void SetWrapExclude(bool f) { m_WrapExclude = f; }
-
- /**
- * Indicate whether this class is defined with only the header file.
- */
- bool IsAHeaderFileOnly() const { return m_HeaderFileOnly; }
- bool GetIsAHeaderFileOnly() const { return m_HeaderFileOnly; }
- void SetIsAHeaderFileOnly(bool f) { m_HeaderFileOnly = f; }
-
+ ///! Set/Get a property of this source file
+ void SetProperty(const char *prop, const char *value);
+ const char *GetProperty(const char *prop) const;
+ bool GetPropertyAsBool(const char *prop) const;
+
/**
* The full path to the file.
*/
@@ -107,14 +89,9 @@ public:
const std::vector<std::string> &GetDepends() const {return m_Depends;}
std::vector<std::string> &GetDepends() {return m_Depends;}
- ///! Set/Get per file compiler flags
- void SetCompileFlags(const char* f) { m_CompileFlags = f;}
- const char* GetCompileFlags() const { return m_CompileFlags.size() ? m_CompileFlags.c_str(): 0; }
private:
- bool m_AbstractClass;
- bool m_WrapExclude;
- bool m_HeaderFileOnly;
- std::string m_CompileFlags;
+
+ std::map<cmStdString,cmStdString> m_Properties;
std::string m_FullPath;
std::string m_SourceName;
std::string m_SourceExtension;
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx
index 63d06e5..60d81b7 100644
--- a/Source/cmSourceFilesCommand.cxx
+++ b/Source/cmSourceFilesCommand.cxx
@@ -71,7 +71,7 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& argsIn)
continue;
}
cmSourceFile file;
- file.SetIsAnAbstractClass(false);
+ file.SetProperty("ABSTRACT","0");
std::string path = cmSystemTools::GetFilenamePath(copy);
if ( generated )
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3c0d052..d253810 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -76,7 +76,7 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
else
{
cmSourceFile file;
- file.SetIsAnAbstractClass(false);
+ file.SetProperty("ABSTRACT","0");
file.SetName(args[i].c_str(), mf.GetCurrentDirectory(),
mf.GetSourceExtensions(),
mf.GetHeaderExtensions());
@@ -92,7 +92,7 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
if (!done)
{
cmSourceFile file;
- file.SetIsAnAbstractClass(false);
+ file.SetProperty("ABSTRACT","0");
file.SetName(temps.c_str(), mf.GetCurrentDirectory(),
mf.GetSourceExtensions(),
mf.GetHeaderExtensions());
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index cf39d67..915493b 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -123,7 +123,7 @@ void cmUnixMakefileGenerator::ProcessDepends(const cmMakeDepend &md)
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
i != classes.end(); ++i)
{
- if(!(*i)->GetIsAHeaderFileOnly())
+ if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
// get the depends
const cmDependInformation *info =
@@ -375,7 +375,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
i != classes.end(); i++)
{
- if(!(*i)->IsAHeaderFileOnly())
+ if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
if(outExt.size())
@@ -390,7 +390,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
i != classes.end(); i++)
{
- if(!(*i)->IsAHeaderFileOnly())
+ if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
if(outExt.size())
@@ -1307,7 +1307,7 @@ bool cmUnixMakefileGenerator::OutputObjectDepends(std::ostream& fout)
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
- if(!(*source)->IsAHeaderFileOnly())
+ if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
if(!(*source)->GetDepends().empty())
{
@@ -1358,7 +1358,7 @@ void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
- if(!(*source)->IsAHeaderFileOnly())
+ if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
if(!(*source)->GetDepends().empty())
{
@@ -1816,7 +1816,7 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
- if(!(*source)->IsAHeaderFileOnly())
+ if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
allsources += " \\\n";
allsources += this->ConvertToOutputPath((*source)->GetFullPath().c_str());
@@ -1931,7 +1931,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
bool shared)
{
// Header files shouldn't have build rules.
- if(source.IsAHeaderFileOnly())
+ if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
{
return;
}
@@ -2005,7 +2005,7 @@ void cmUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fout)
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
- if(!(*source)->IsAHeaderFileOnly())
+ if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
{
std::string shortName;
std::string sourceName;
@@ -2042,9 +2042,9 @@ void cmUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fout)
// Only output a rule for each .o once.
if(rules.find(shortNameWithExt) == rules.end())
{
- if((*source)->GetCompileFlags())
+ if((*source)->GetProperty("COMPILE_FLAGS"))
{
- exportsDef += (*source)->GetCompileFlags();
+ exportsDef += (*source)->GetProperty("COMPILE_FLAGS");
exportsDef += " ";
}
this->OutputBuildObjectFromSource(fout,
diff --git a/Source/cmVTKMakeInstantiatorCommand.cxx b/Source/cmVTKMakeInstantiatorCommand.cxx
index 2266f8e..ae02e4b 100644
--- a/Source/cmVTKMakeInstantiatorCommand.cxx
+++ b/Source/cmVTKMakeInstantiatorCommand.cxx
@@ -111,7 +111,8 @@ cmVTKMakeInstantiatorCommand
// vtkIndent and vtkTimeStamp are special cases and are not
// vtkObject subclasses.
if(
- (!sf || (!sf->GetWrapExclude() && !sf->GetIsAnAbstractClass())) &&
+ (!sf || (!sf->GetPropertyAsBool("WRAP_EXCLUDE") &&
+ !sf->GetPropertyAsBool("ABSTRACT"))) &&
((srcName != "vtkIndent") && (srcName != "vtkTimeStamp")))
{
m_Classes.push_back(srcName);
@@ -159,8 +160,8 @@ cmVTKMakeInstantiatorCommand
// Add the generated source file into the source list.
cmSourceFile file;
- file.SetWrapExclude(true);
- file.SetIsAnAbstractClass(false);
+ file.SetProperty("WRAP_EXCLUDE","1");
+ file.SetProperty("ABSTRACT","0");
file.SetName(fileName.c_str(), filePath.c_str(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
@@ -197,8 +198,8 @@ cmVTKMakeInstantiatorCommand
// Add the generated source file into the source list.
cmSourceFile file;
- file.SetWrapExclude(true);
- file.SetIsAnAbstractClass(false);
+ file.SetProperty("WRAP_EXCLUDE","1");
+ file.SetProperty("ABSTRACT","0");
file.SetName(fileName.c_str(), filePath.c_str(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx
index 29e943e..1fbbfdd 100644
--- a/Source/cmVTKWrapJavaCommand.cxx
+++ b/Source/cmVTKWrapJavaCommand.cxx
@@ -55,12 +55,12 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
// if we should wrap the class
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile file;
if (curr)
{
- file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
+ file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Java";
@@ -124,7 +124,7 @@ void cmVTKWrapJavaCommand::FinalPass()
{
args.push_back(hints);
}
- args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
+ args.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
args.push_back(res);
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
@@ -137,7 +137,7 @@ void cmVTKWrapJavaCommand::FinalPass()
{
args2.push_back(hints);
}
- args2.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
+ args2.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
args2.push_back(res2);
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx
index 9000689..cae135c 100644
--- a/Source/cmVTKWrapPythonCommand.cxx
+++ b/Source/cmVTKWrapPythonCommand.cxx
@@ -66,12 +66,12 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
// if we should wrap the class
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile file;
if (curr)
{
- file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
+ file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Python";
@@ -88,7 +88,7 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& argsIn)
}
cmSourceFile cfile;
- cfile.SetIsAnAbstractClass(false);
+ cfile.SetProperty("ABSTRACT","0");
this->CreateInitFile(res);
cfile.SetName(initName.c_str(), m_Makefile->GetCurrentOutputDirectory(),
"cxx",false);
@@ -125,7 +125,7 @@ void cmVTKWrapPythonCommand::FinalPass()
{
args.push_back(hints);
}
- args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
+ args.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
args.push_back(res);
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx
index 172e032..c724f5c 100644
--- a/Source/cmVTKWrapTclCommand.cxx
+++ b/Source/cmVTKWrapTclCommand.cxx
@@ -102,12 +102,12 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
// if we should wrap the class
- if (!curr || !curr->GetWrapExclude())
+ if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
cmSourceFile file;
if (curr)
{
- file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
+ file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Tcl";
@@ -124,7 +124,7 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
}
// add the init file
cmSourceFile cfile;
- cfile.SetIsAnAbstractClass(false);
+ cfile.SetProperty("ABSTRACT","0");
std::string newName = m_LibraryName;
newName += "Init";
this->CreateInitFile(res);
@@ -162,7 +162,7 @@ void cmVTKWrapTclCommand::FinalPass()
{
args.push_back(hints);
}
- args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
+ args.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
std::string res = m_Makefile->GetCurrentOutputDirectory();
res += "/";
res += m_WrapClasses[classNum].GetSourceName() + ".cxx";
@@ -184,7 +184,7 @@ bool cmVTKWrapTclCommand::CreateInitFile(std::string& res)
size_t classNum;
for(classNum = 0; classNum < lastClass; classNum++)
{
- if (!m_WrapClasses[classNum].IsAnAbstractClass())
+ if (!m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT"))
{
std::string cls = m_WrapHeaders[classNum];
cls = cls.substr(0,cls.size()-2);
diff --git a/Source/cmWrapExcludeFilesCommand.cxx b/Source/cmWrapExcludeFilesCommand.cxx
index 90c98c2..76f60a0 100644
--- a/Source/cmWrapExcludeFilesCommand.cxx
+++ b/Source/cmWrapExcludeFilesCommand.cxx
@@ -42,7 +42,7 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
if(sf)
{
- sf->SetWrapExclude(true);
+ sf->SetProperty("WRAP_EXCLUDE","1");
}
// if file is not already in the makefile, then add it
else
@@ -51,7 +51,7 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args
cmSourceFile file;
std::string path = cmSystemTools::GetFilenamePath(newfile);
// set the flags
- file.SetWrapExclude(true);
+ file.SetProperty("WRAP_EXCLUDE","1");
// if this is a full path then
if((path.size() && path[0] == '/') ||
(path.size() > 1 && path[1] == ':'))