summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-04 15:30:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-04 15:30:46 (GMT)
commitde10cfc72e51094d3a8f3a8d10f09a902330a2f3 (patch)
tree19175a07cd503bb427d1f394dc9a7d555b28246f /Source/cmMakefile.cxx
parent33e1a4a09aaedfcb869e2f4217815e09f0d3187f (diff)
downloadCMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.zip
CMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.tar.gz
CMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.tar.bz2
ENH: move testing stuff to cmake from configure, good bye dashboard... :)
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx83
1 files changed, 38 insertions, 45 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9be764f..0cfe265 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -155,6 +155,11 @@ void cmMakefile::Print() const
this->PrintStringVector("m_LinkDirectories", m_LinkDirectories);
this->PrintStringVector("m_Utilities", m_Utilities);
this->PrintStringVector("m_UtilityDirectories", m_UtilityDirectories);
+ for( std::vector<cmSourceGroup>::const_iterator i = m_SourceGroups.begin();
+ i != m_SourceGroups.end(); ++i)
+ {
+ i->Print();
+ }
}
// Parse the given CMakeLists.txt file into a list of classes.
@@ -231,63 +236,51 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external)
std::vector<std::string> arguments;
while ( fin )
{
- // add this list file to the list of dependencies
- m_ListFiles.push_back( filenametoread);
+ // add this list file to the list of dependencies
+ m_ListFiles.push_back( filenametoread);
if(cmSystemTools::ParseFunction(fin, name, arguments) &&
!this->IsFunctionBlocked(name.c_str(),arguments))
{
- // Special command that needs to be removed when
- // ADD_COMMAND is implemented
- if(name == "VERBATIM")
- {
- if (!inheriting)
- {
- m_MakeVerbatim = arguments;
- }
- }
- else
+ RegisteredCommandsMap::iterator pos = m_Commands.find(name);
+ if(pos != m_Commands.end())
{
- RegisteredCommandsMap::iterator pos = m_Commands.find(name);
- if(pos != m_Commands.end())
+ cmCommand* rm = (*pos).second;
+ cmCommand* usedCommand = rm->Clone();
+ usedCommand->SetMakefile(this);
+ bool keepCommand = false;
+ if(usedCommand->GetEnabled())
{
- cmCommand* rm = (*pos).second;
- cmCommand* usedCommand = rm->Clone();
- usedCommand->SetMakefile(this);
- bool keepCommand = false;
- if(usedCommand->GetEnabled())
+ // if not running in inherit mode or
+ // if the command is inherited then Invoke it.
+ if(!inheriting || usedCommand->IsInherited())
{
- // if not running in inherit mode or
- // if the command is inherited then Invoke it.
- if(!inheriting || usedCommand->IsInherited())
+ if(!usedCommand->Invoke(arguments))
{
- if(!usedCommand->Invoke(arguments))
- {
- cmSystemTools::Error(usedCommand->GetName(),
- ": Error : \n",
- usedCommand->GetError(),
- m_cmCurrentDirectory.c_str());
- }
- else
- {
- // use the command
- keepCommand = true;
- m_UsedCommands.push_back(usedCommand);
- }
+ cmSystemTools::Error(usedCommand->GetName(),
+ ": Error : \n",
+ usedCommand->GetError(),
+ m_cmCurrentDirectory.c_str());
+ }
+ else
+ {
+ // use the command
+ keepCommand = true;
+ m_UsedCommands.push_back(usedCommand);
}
- }
- // if the Cloned command was not used
- // then delete it
- if(!keepCommand)
- {
- delete usedCommand;
}
}
- else
+ // if the Cloned command was not used
+ // then delete it
+ if(!keepCommand)
{
- cmSystemTools::Error("unknown CMake command ", name.c_str());
+ delete usedCommand;
}
}
+ else
+ {
+ cmSystemTools::Error("unknown CMake command ", name.c_str(), filename);
+ }
}
}
@@ -663,11 +656,11 @@ void cmMakefile::RemoveVariablesInString(std::string& source) const
cmRegularExpression var2("(@[A-Za-z_0-9]*@)");
while (var.find(source))
{
- source.erase(var.start(),var.end());
+ source.erase(var.start(),var.end() - var.start());
}
while (var2.find(source))
{
- source.erase(var2.start(),var2.end());
+ source.erase(var2.start(),var2.end() - var2.start());
}
}