modified how source files store properties
This commit is contained in:
parent
f7b1a90256
commit
7b5a8762c6
|
@ -44,7 +44,7 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
|
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
|
||||||
if(sf)
|
if(sf)
|
||||||
{
|
{
|
||||||
sf->SetIsAnAbstractClass(true);
|
sf->SetProperty("ABSTRACT","1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,7 +69,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
|
||||||
cmfile.SetName(fullname.c_str(), m_Makefile->GetCurrentDirectory(),
|
cmfile.SetName(fullname.c_str(), m_Makefile->GetCurrentDirectory(),
|
||||||
m_Makefile->GetSourceExtensions(),
|
m_Makefile->GetSourceExtensions(),
|
||||||
m_Makefile->GetHeaderExtensions());
|
m_Makefile->GetHeaderExtensions());
|
||||||
cmfile.SetIsAnAbstractClass(false);
|
cmfile.SetProperty("ABSTRACT","0");
|
||||||
m_Makefile->AddSource(cmfile);
|
m_Makefile->AddSource(cmfile);
|
||||||
if (sourceListValue.size() > 0)
|
if (sourceListValue.size() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,7 +169,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
shared = true;
|
shared = true;
|
||||||
}
|
}
|
||||||
// Header files shouldn't have build rules.
|
// Header files shouldn't have build rules.
|
||||||
if(source.IsAHeaderFileOnly())
|
if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,7 +279,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile cfile;
|
cmSourceFile cfile;
|
||||||
std::string sourceListValue;
|
std::string sourceListValue;
|
||||||
|
|
||||||
cfile.SetIsAnAbstractClass(false);
|
cfile.SetProperty("ABSTRACT","0");
|
||||||
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
|
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
|
||||||
m_Makefile->GetCurrentOutputDirectory(),
|
m_Makefile->GetCurrentOutputDirectory(),
|
||||||
cmSystemTools::GetFilenameExtension(args[1]).c_str()+1,
|
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)
|
for(i = testsBegin; i != tests.end(); ++i)
|
||||||
{
|
{
|
||||||
cmSourceFile cfile;
|
cmSourceFile cfile;
|
||||||
cfile.SetIsAnAbstractClass(false);
|
cfile.SetProperty("ABSTRACT","0");
|
||||||
cfile.SetName(i->c_str(),
|
cfile.SetName(i->c_str(),
|
||||||
m_Makefile->GetCurrentDirectory(),
|
m_Makefile->GetCurrentDirectory(),
|
||||||
m_Makefile->GetSourceExtensions(),
|
m_Makefile->GetSourceExtensions(),
|
||||||
|
|
|
@ -277,7 +277,7 @@ void cmDSPWriter::WriteDSPFile(std::ostream& fout,
|
||||||
const char* compileFlags = 0;
|
const char* compileFlags = 0;
|
||||||
if(cc->second.m_SourceFile)
|
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)
|
if (source != libName || target.GetType() == cmTarget::UTILITY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
|
||||||
// if we should use the source GUI
|
// if we should use the source GUI
|
||||||
// to generate .cxx and .h files
|
// to generate .cxx and .h files
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile header_file;
|
cmSourceFile header_file;
|
||||||
cmSourceFile source_file;
|
cmSourceFile source_file;
|
||||||
|
|
|
@ -32,15 +32,15 @@ bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
|
||||||
{
|
{
|
||||||
if(args[2] == "ABSTRACT")
|
if(args[2] == "ABSTRACT")
|
||||||
{
|
{
|
||||||
m_Makefile->AddDefinition(var, sf->IsAnAbstractClass());
|
m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("ABSTRACT"));
|
||||||
}
|
}
|
||||||
if(args[2] == "WRAP_EXCLUDE")
|
if(args[2] == "WRAP_EXCLUDE")
|
||||||
{
|
{
|
||||||
m_Makefile->AddDefinition(var, sf->GetWrapExclude());
|
m_Makefile->AddDefinition(var, sf->GetPropertyAsBool("WRAP_EXCLUDE"));
|
||||||
}
|
}
|
||||||
if(args[2] == "COMPILE_FLAGS")
|
if(args[2] == "COMPILE_FLAGS")
|
||||||
{
|
{
|
||||||
m_Makefile->AddDefinition(var, sf->GetCompileFlags());
|
m_Makefile->AddDefinition(var, sf->GetProperty("COMPILE_FLAGS"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ void cmMSDotNETGenerator::WriteVCProjFile(std::ostream& fout,
|
||||||
const char* compileFlags = 0;
|
const char* compileFlags = 0;
|
||||||
if(cc->second.m_SourceFile)
|
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)
|
if (source != libName || target.GetType() == cmTarget::UTILITY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,7 +277,7 @@ void cmMakeDepend::GenerateMakefileDependencies()
|
||||||
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
|
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
|
||||||
i != classes.end(); ++i)
|
i != classes.end(); ++i)
|
||||||
{
|
{
|
||||||
if(!(*i)->GetIsAHeaderFileOnly())
|
if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
cmDependInformation* info =
|
cmDependInformation* info =
|
||||||
this->GetDependInformation((*i)->GetFullPath().c_str(),NULL);
|
this->GetDependInformation((*i)->GetFullPath().c_str(),NULL);
|
||||||
|
|
|
@ -324,8 +324,10 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
bool shared)
|
bool shared)
|
||||||
{
|
{
|
||||||
// Header files shouldn't have build rules.
|
// Header files shouldn't have build rules.
|
||||||
if(source.IsAHeaderFileOnly())
|
if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::string comment = "Build ";
|
std::string comment = "Build ";
|
||||||
std::string objectFile = std::string(shortName) +
|
std::string objectFile = std::string(shortName) +
|
||||||
|
|
|
@ -65,12 +65,12 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
||||||
|
|
||||||
// if we should wrap the class
|
// if we should wrap the class
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
if (curr)
|
if (curr)
|
||||||
{
|
{
|
||||||
file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
|
file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
|
||||||
}
|
}
|
||||||
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
||||||
std::string newName = "moc_" + srcName;
|
std::string newName = "moc_" + srcName;
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
||||||
|
|
||||||
// if we should wrap the class
|
// if we should wrap the class
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile header_file;
|
cmSourceFile header_file;
|
||||||
cmSourceFile source_file;
|
cmSourceFile source_file;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#include "cmSetSourceFilesPropertiesCommand.h"
|
#include "cmSetSourceFilesPropertiesCommand.h"
|
||||||
|
|
||||||
// cmSetSourceFilesPropertiesCommand
|
// cmSetSourceFilesPropertiesCommand
|
||||||
bool cmSetSourceFilesPropertiesCommand::InitialPass(std::vector<std::string> const&
|
bool cmSetSourceFilesPropertiesCommand::InitialPass(
|
||||||
argsIn)
|
std::vector<std::string> const& argsIn)
|
||||||
{
|
{
|
||||||
if(argsIn.size() < 2 )
|
if(argsIn.size() < 2 )
|
||||||
{
|
{
|
||||||
|
@ -28,70 +28,99 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(std::vector<std::string> con
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
cmSystemTools::ExpandListArguments(argsIn, 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;
|
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)
|
for(j= args.begin(); j != args.end();++j)
|
||||||
{
|
{
|
||||||
|
// old style allows for specifier before PROPERTIES keyword
|
||||||
if(*j == "ABSTRACT")
|
if(*j == "ABSTRACT")
|
||||||
{
|
{
|
||||||
abstract = true;
|
doingFiles = false;
|
||||||
|
propertyPairs.push_back("ABSTRACT");
|
||||||
|
propertyPairs.push_back("1");
|
||||||
}
|
}
|
||||||
else if(*j == "WRAP_EXCLUDE")
|
else if(*j == "WRAP_EXCLUDE")
|
||||||
{
|
{
|
||||||
wrap_exclude = true;
|
doingFiles = false;
|
||||||
|
propertyPairs.push_back("WRAP_EXCLUDE");
|
||||||
|
propertyPairs.push_back("1");
|
||||||
}
|
}
|
||||||
else if(*j == "GENERATED")
|
else if(*j == "GENERATED")
|
||||||
{
|
{
|
||||||
generated = true;
|
doingFiles = false;
|
||||||
|
propertyPairs.push_back("GENERATED");
|
||||||
|
propertyPairs.push_back("1");
|
||||||
}
|
}
|
||||||
else if(*j == "COMPILE_FLAGS")
|
else if(*j == "COMPILE_FLAGS")
|
||||||
{
|
{
|
||||||
|
doingFiles = false;
|
||||||
|
propertyPairs.push_back("COMPILE_FLAGS");
|
||||||
++j;
|
++j;
|
||||||
if(j == args.end())
|
if(j == args.end())
|
||||||
{
|
{
|
||||||
this->SetError("called with incorrect number of arguments FLAGS with no flags");
|
this->SetError("called with incorrect number of arguments COMPILE_FLAGS with no flags");
|
||||||
return false;
|
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
|
// 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
|
// 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(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
|
// if file is not already in the makefile, then add it
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string newfile = *j;
|
std::string newfile = args[i];
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
std::string path = cmSystemTools::GetFilenamePath(newfile);
|
std::string path = cmSystemTools::GetFilenamePath(newfile);
|
||||||
// set the flags
|
// now loop through all the props and set them
|
||||||
file.SetIsAnAbstractClass(abstract);
|
for (k = 0; k < propertyPairs.size(); k = k + 2)
|
||||||
file.SetWrapExclude(wrap_exclude);
|
|
||||||
if(flags.size())
|
|
||||||
{
|
{
|
||||||
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 ext = cmSystemTools::GetFilenameExtension(newfile);
|
||||||
std::string name_no_ext = cmSystemTools::GetFilenameName(newfile.c_str());
|
std::string name_no_ext = cmSystemTools::GetFilenameName(newfile.c_str());
|
||||||
|
|
|
@ -53,9 +53,9 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"SET_SOURCE_FILES_PROPERTIES(file1 file2 .. filen [ABSTRACT|WRAP_EXCLUDE|GENERATED|COMPILE_FLAGS] [flags]) "
|
"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 "
|
"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.";
|
"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);
|
cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand);
|
||||||
|
|
|
@ -28,7 +28,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
|
||||||
const std::vector<std::string>& sourceExts,
|
const std::vector<std::string>& sourceExts,
|
||||||
const std::vector<std::string>& headerExts)
|
const std::vector<std::string>& headerExts)
|
||||||
{
|
{
|
||||||
m_HeaderFileOnly = true;
|
this->SetProperty("HEADER_FILE_ONLY","1");
|
||||||
|
|
||||||
m_SourceName = name;
|
m_SourceName = name;
|
||||||
std::string pathname = dir;
|
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
|
// See if the file is a header file
|
||||||
if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) == headerExts.end())
|
if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) ==
|
||||||
m_HeaderFileOnly = false;
|
headerExts.end())
|
||||||
else
|
{
|
||||||
m_HeaderFileOnly = true;
|
this->SetProperty("HEADER_FILE_ONLY","0");
|
||||||
|
}
|
||||||
m_FullPath = hname;
|
m_FullPath = hname;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -86,7 +87,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
|
||||||
if(cmSystemTools::FileExists(hname.c_str()))
|
if(cmSystemTools::FileExists(hname.c_str()))
|
||||||
{
|
{
|
||||||
m_SourceExtension = *ext;
|
m_SourceExtension = *ext;
|
||||||
m_HeaderFileOnly = false;
|
this->SetProperty("HEADER_FILE_ONLY","0");
|
||||||
m_FullPath = hname;
|
m_FullPath = hname;
|
||||||
return;
|
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,
|
void cmSourceFile::SetName(const char* name, const char* dir, const char *ext,
|
||||||
bool hfo)
|
bool hfo)
|
||||||
{
|
{
|
||||||
m_HeaderFileOnly = hfo;
|
this->SetProperty("HEADER_FILE_ONLY",(hfo ? "1" : "0"));
|
||||||
m_SourceName = name;
|
m_SourceName = name;
|
||||||
std::string pathname = dir;
|
std::string pathname = dir;
|
||||||
if(pathname != "")
|
if(pathname != "")
|
||||||
|
@ -149,24 +150,38 @@ void cmSourceFile::SetName(const char* name, const char* dir, const char *ext,
|
||||||
|
|
||||||
void cmSourceFile::Print() const
|
void cmSourceFile::Print() const
|
||||||
{
|
{
|
||||||
if(m_AbstractClass)
|
|
||||||
{
|
|
||||||
std::cerr << "Abstract ";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "Concrete ";
|
|
||||||
}
|
|
||||||
if(m_HeaderFileOnly)
|
|
||||||
{
|
|
||||||
std::cerr << "Header file ";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "CXX file ";
|
|
||||||
}
|
|
||||||
std::cerr << "m_CompileFlags: " << m_CompileFlags << "\n";
|
|
||||||
std::cerr << "m_FullPath: " << m_FullPath << "\n";
|
std::cerr << "m_FullPath: " << m_FullPath << "\n";
|
||||||
std::cerr << "m_SourceName: " << m_SourceName << std::endl;
|
std::cerr << "m_SourceName: " << m_SourceName << std::endl;
|
||||||
std::cerr << "m_SourceExtension: " << m_SourceExtension << "\n";
|
std::cerr << "m_SourceExtension: " << m_SourceExtension << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmSourceFile::SetProperty(const char* prop, const char* value)
|
||||||
|
{
|
||||||
|
if (!prop)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
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())
|
||||||
|
{
|
||||||
|
return i->second.c_str();
|
||||||
|
}
|
||||||
|
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())
|
||||||
|
{
|
||||||
|
return cmSystemTools::IsOn(i->second.c_str());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -34,9 +34,6 @@ public:
|
||||||
*/
|
*/
|
||||||
cmSourceFile()
|
cmSourceFile()
|
||||||
{
|
{
|
||||||
m_AbstractClass = false;
|
|
||||||
m_HeaderFileOnly = false;
|
|
||||||
m_WrapExclude = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,25 +58,10 @@ public:
|
||||||
*/
|
*/
|
||||||
void Print() const;
|
void Print() const;
|
||||||
|
|
||||||
/**
|
///! Set/Get a property of this source file
|
||||||
* Indicate whether the class is abstract (non-instantiable).
|
void SetProperty(const char *prop, const char *value);
|
||||||
*/
|
const char *GetProperty(const char *prop) const;
|
||||||
bool IsAnAbstractClass() const { return m_AbstractClass; }
|
bool GetPropertyAsBool(const char *prop) const;
|
||||||
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; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The full path to the file.
|
* The full path to the file.
|
||||||
|
@ -107,14 +89,9 @@ public:
|
||||||
const std::vector<std::string> &GetDepends() const {return m_Depends;}
|
const std::vector<std::string> &GetDepends() const {return m_Depends;}
|
||||||
std::vector<std::string> &GetDepends() {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:
|
private:
|
||||||
bool m_AbstractClass;
|
|
||||||
bool m_WrapExclude;
|
std::map<cmStdString,cmStdString> m_Properties;
|
||||||
bool m_HeaderFileOnly;
|
|
||||||
std::string m_CompileFlags;
|
|
||||||
std::string m_FullPath;
|
std::string m_FullPath;
|
||||||
std::string m_SourceName;
|
std::string m_SourceName;
|
||||||
std::string m_SourceExtension;
|
std::string m_SourceExtension;
|
||||||
|
|
|
@ -71,7 +71,7 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetProperty("ABSTRACT","0");
|
||||||
std::string path = cmSystemTools::GetFilenamePath(copy);
|
std::string path = cmSystemTools::GetFilenamePath(copy);
|
||||||
if ( generated )
|
if ( generated )
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,7 +76,7 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetProperty("ABSTRACT","0");
|
||||||
file.SetName(args[i].c_str(), mf.GetCurrentDirectory(),
|
file.SetName(args[i].c_str(), mf.GetCurrentDirectory(),
|
||||||
mf.GetSourceExtensions(),
|
mf.GetSourceExtensions(),
|
||||||
mf.GetHeaderExtensions());
|
mf.GetHeaderExtensions());
|
||||||
|
@ -92,7 +92,7 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
|
||||||
if (!done)
|
if (!done)
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetProperty("ABSTRACT","0");
|
||||||
file.SetName(temps.c_str(), mf.GetCurrentDirectory(),
|
file.SetName(temps.c_str(), mf.GetCurrentDirectory(),
|
||||||
mf.GetSourceExtensions(),
|
mf.GetSourceExtensions(),
|
||||||
mf.GetHeaderExtensions());
|
mf.GetHeaderExtensions());
|
||||||
|
|
|
@ -123,7 +123,7 @@ void cmUnixMakefileGenerator::ProcessDepends(const cmMakeDepend &md)
|
||||||
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
||||||
i != classes.end(); ++i)
|
i != classes.end(); ++i)
|
||||||
{
|
{
|
||||||
if(!(*i)->GetIsAHeaderFileOnly())
|
if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
// get the depends
|
// get the depends
|
||||||
const cmDependInformation *info =
|
const cmDependInformation *info =
|
||||||
|
@ -375,7 +375,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
||||||
i != classes.end(); i++)
|
i != classes.end(); i++)
|
||||||
{
|
{
|
||||||
if(!(*i)->IsAHeaderFileOnly())
|
if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
||||||
if(outExt.size())
|
if(outExt.size())
|
||||||
|
@ -390,7 +390,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
|
||||||
i != classes.end(); i++)
|
i != classes.end(); i++)
|
||||||
{
|
{
|
||||||
if(!(*i)->IsAHeaderFileOnly())
|
if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
||||||
if(outExt.size())
|
if(outExt.size())
|
||||||
|
@ -1307,7 +1307,7 @@ bool cmUnixMakefileGenerator::OutputObjectDepends(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
||||||
source != sources.end(); ++source)
|
source != sources.end(); ++source)
|
||||||
{
|
{
|
||||||
if(!(*source)->IsAHeaderFileOnly())
|
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
if(!(*source)->GetDepends().empty())
|
if(!(*source)->GetDepends().empty())
|
||||||
{
|
{
|
||||||
|
@ -1358,7 +1358,7 @@ void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
||||||
source != sources.end(); ++source)
|
source != sources.end(); ++source)
|
||||||
{
|
{
|
||||||
if(!(*source)->IsAHeaderFileOnly())
|
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
if(!(*source)->GetDepends().empty())
|
if(!(*source)->GetDepends().empty())
|
||||||
{
|
{
|
||||||
|
@ -1816,7 +1816,7 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
||||||
source != sources.end(); ++source)
|
source != sources.end(); ++source)
|
||||||
{
|
{
|
||||||
if(!(*source)->IsAHeaderFileOnly())
|
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
allsources += " \\\n";
|
allsources += " \\\n";
|
||||||
allsources += this->ConvertToOutputPath((*source)->GetFullPath().c_str());
|
allsources += this->ConvertToOutputPath((*source)->GetFullPath().c_str());
|
||||||
|
@ -1931,7 +1931,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
bool shared)
|
bool shared)
|
||||||
{
|
{
|
||||||
// Header files shouldn't have build rules.
|
// Header files shouldn't have build rules.
|
||||||
if(source.IsAHeaderFileOnly())
|
if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2005,7 +2005,7 @@ void cmUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fout)
|
||||||
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
||||||
source != sources.end(); ++source)
|
source != sources.end(); ++source)
|
||||||
{
|
{
|
||||||
if(!(*source)->IsAHeaderFileOnly())
|
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
std::string shortName;
|
std::string shortName;
|
||||||
std::string sourceName;
|
std::string sourceName;
|
||||||
|
@ -2042,9 +2042,9 @@ void cmUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fout)
|
||||||
// Only output a rule for each .o once.
|
// Only output a rule for each .o once.
|
||||||
if(rules.find(shortNameWithExt) == rules.end())
|
if(rules.find(shortNameWithExt) == rules.end())
|
||||||
{
|
{
|
||||||
if((*source)->GetCompileFlags())
|
if((*source)->GetProperty("COMPILE_FLAGS"))
|
||||||
{
|
{
|
||||||
exportsDef += (*source)->GetCompileFlags();
|
exportsDef += (*source)->GetProperty("COMPILE_FLAGS");
|
||||||
exportsDef += " ";
|
exportsDef += " ";
|
||||||
}
|
}
|
||||||
this->OutputBuildObjectFromSource(fout,
|
this->OutputBuildObjectFromSource(fout,
|
||||||
|
|
|
@ -111,7 +111,8 @@ cmVTKMakeInstantiatorCommand
|
||||||
// vtkIndent and vtkTimeStamp are special cases and are not
|
// vtkIndent and vtkTimeStamp are special cases and are not
|
||||||
// vtkObject subclasses.
|
// vtkObject subclasses.
|
||||||
if(
|
if(
|
||||||
(!sf || (!sf->GetWrapExclude() && !sf->GetIsAnAbstractClass())) &&
|
(!sf || (!sf->GetPropertyAsBool("WRAP_EXCLUDE") &&
|
||||||
|
!sf->GetPropertyAsBool("ABSTRACT"))) &&
|
||||||
((srcName != "vtkIndent") && (srcName != "vtkTimeStamp")))
|
((srcName != "vtkIndent") && (srcName != "vtkTimeStamp")))
|
||||||
{
|
{
|
||||||
m_Classes.push_back(srcName);
|
m_Classes.push_back(srcName);
|
||||||
|
@ -159,8 +160,8 @@ cmVTKMakeInstantiatorCommand
|
||||||
|
|
||||||
// Add the generated source file into the source list.
|
// Add the generated source file into the source list.
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetWrapExclude(true);
|
file.SetProperty("WRAP_EXCLUDE","1");
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetProperty("ABSTRACT","0");
|
||||||
file.SetName(fileName.c_str(), filePath.c_str(),
|
file.SetName(fileName.c_str(), filePath.c_str(),
|
||||||
m_Makefile->GetSourceExtensions(),
|
m_Makefile->GetSourceExtensions(),
|
||||||
m_Makefile->GetHeaderExtensions());
|
m_Makefile->GetHeaderExtensions());
|
||||||
|
@ -197,8 +198,8 @@ cmVTKMakeInstantiatorCommand
|
||||||
|
|
||||||
// Add the generated source file into the source list.
|
// Add the generated source file into the source list.
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetWrapExclude(true);
|
file.SetProperty("WRAP_EXCLUDE","1");
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetProperty("ABSTRACT","0");
|
||||||
file.SetName(fileName.c_str(), filePath.c_str(),
|
file.SetName(fileName.c_str(), filePath.c_str(),
|
||||||
m_Makefile->GetSourceExtensions(),
|
m_Makefile->GetSourceExtensions(),
|
||||||
m_Makefile->GetHeaderExtensions());
|
m_Makefile->GetHeaderExtensions());
|
||||||
|
|
|
@ -55,12 +55,12 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
||||||
|
|
||||||
// if we should wrap the class
|
// if we should wrap the class
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
if (curr)
|
if (curr)
|
||||||
{
|
{
|
||||||
file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
|
file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
|
||||||
}
|
}
|
||||||
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
||||||
std::string newName = srcName + "Java";
|
std::string newName = srcName + "Java";
|
||||||
|
@ -124,7 +124,7 @@ void cmVTKWrapJavaCommand::FinalPass()
|
||||||
{
|
{
|
||||||
args.push_back(hints);
|
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);
|
args.push_back(res);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
|
@ -137,7 +137,7 @@ void cmVTKWrapJavaCommand::FinalPass()
|
||||||
{
|
{
|
||||||
args2.push_back(hints);
|
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);
|
args2.push_back(res2);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
|
|
|
@ -66,12 +66,12 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
||||||
|
|
||||||
// if we should wrap the class
|
// if we should wrap the class
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
if (curr)
|
if (curr)
|
||||||
{
|
{
|
||||||
file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
|
file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
|
||||||
}
|
}
|
||||||
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
||||||
std::string newName = srcName + "Python";
|
std::string newName = srcName + "Python";
|
||||||
|
@ -88,7 +88,7 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmSourceFile cfile;
|
cmSourceFile cfile;
|
||||||
cfile.SetIsAnAbstractClass(false);
|
cfile.SetProperty("ABSTRACT","0");
|
||||||
this->CreateInitFile(res);
|
this->CreateInitFile(res);
|
||||||
cfile.SetName(initName.c_str(), m_Makefile->GetCurrentOutputDirectory(),
|
cfile.SetName(initName.c_str(), m_Makefile->GetCurrentOutputDirectory(),
|
||||||
"cxx",false);
|
"cxx",false);
|
||||||
|
@ -125,7 +125,7 @@ void cmVTKWrapPythonCommand::FinalPass()
|
||||||
{
|
{
|
||||||
args.push_back(hints);
|
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);
|
args.push_back(res);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
|
|
|
@ -102,12 +102,12 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
cmSourceFile *curr = m_Makefile->GetSource(j->c_str());
|
||||||
|
|
||||||
// if we should wrap the class
|
// if we should wrap the class
|
||||||
if (!curr || !curr->GetWrapExclude())
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
{
|
{
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
if (curr)
|
if (curr)
|
||||||
{
|
{
|
||||||
file.SetIsAnAbstractClass(curr->IsAnAbstractClass());
|
file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
|
||||||
}
|
}
|
||||||
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
|
||||||
std::string newName = srcName + "Tcl";
|
std::string newName = srcName + "Tcl";
|
||||||
|
@ -124,7 +124,7 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
}
|
}
|
||||||
// add the init file
|
// add the init file
|
||||||
cmSourceFile cfile;
|
cmSourceFile cfile;
|
||||||
cfile.SetIsAnAbstractClass(false);
|
cfile.SetProperty("ABSTRACT","0");
|
||||||
std::string newName = m_LibraryName;
|
std::string newName = m_LibraryName;
|
||||||
newName += "Init";
|
newName += "Init";
|
||||||
this->CreateInitFile(res);
|
this->CreateInitFile(res);
|
||||||
|
@ -162,7 +162,7 @@ void cmVTKWrapTclCommand::FinalPass()
|
||||||
{
|
{
|
||||||
args.push_back(hints);
|
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();
|
std::string res = m_Makefile->GetCurrentOutputDirectory();
|
||||||
res += "/";
|
res += "/";
|
||||||
res += m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
res += m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
||||||
|
@ -184,7 +184,7 @@ bool cmVTKWrapTclCommand::CreateInitFile(std::string& res)
|
||||||
size_t classNum;
|
size_t classNum;
|
||||||
for(classNum = 0; classNum < lastClass; classNum++)
|
for(classNum = 0; classNum < lastClass; classNum++)
|
||||||
{
|
{
|
||||||
if (!m_WrapClasses[classNum].IsAnAbstractClass())
|
if (!m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT"))
|
||||||
{
|
{
|
||||||
std::string cls = m_WrapHeaders[classNum];
|
std::string cls = m_WrapHeaders[classNum];
|
||||||
cls = cls.substr(0,cls.size()-2);
|
cls = cls.substr(0,cls.size()-2);
|
||||||
|
|
|
@ -42,7 +42,7 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args
|
||||||
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
|
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
|
||||||
if(sf)
|
if(sf)
|
||||||
{
|
{
|
||||||
sf->SetWrapExclude(true);
|
sf->SetProperty("WRAP_EXCLUDE","1");
|
||||||
}
|
}
|
||||||
// if file is not already in the makefile, then add it
|
// if file is not already in the makefile, then add it
|
||||||
else
|
else
|
||||||
|
@ -51,7 +51,7 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
std::string path = cmSystemTools::GetFilenamePath(newfile);
|
std::string path = cmSystemTools::GetFilenamePath(newfile);
|
||||||
// set the flags
|
// set the flags
|
||||||
file.SetWrapExclude(true);
|
file.SetProperty("WRAP_EXCLUDE","1");
|
||||||
// if this is a full path then
|
// if this is a full path then
|
||||||
if((path.size() && path[0] == '/') ||
|
if((path.size() && path[0] == '/') ||
|
||||||
(path.size() > 1 && path[1] == ':'))
|
(path.size() > 1 && path[1] == ':'))
|
||||||
|
|
Loading…
Reference in New Issue