ENH: change InitialPass to take a const reference to the argument string, to avoid changes to the file cache

This commit is contained in:
Bill Hoffman 2001-09-20 15:08:30 -04:00
parent b9d56e8497
commit baa28efd10
111 changed files with 158 additions and 152 deletions

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAbstractFilesCommand.h" #include "cmAbstractFilesCommand.h"
// cmAbstractFilesCommand // cmAbstractFilesCommand
bool cmAbstractFilesCommand::InitialPass(std::vector<std::string>& args) bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -49,7 +49,7 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string>& args)
return false; return false;
} }
cmMakefile::SourceMap &Classes = m_Makefile->GetSources(); cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
for(std::vector<std::string>::iterator j = args.begin(); for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j) j != args.end(); ++j)
{ {
for(cmMakefile::SourceMap::iterator l = Classes.begin(); for(cmMakefile::SourceMap::iterator l = Classes.begin();

View File

@ -56,7 +56,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the input file. * the input file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,8 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAddCustomTargetCommand.h" #include "cmAddCustomTargetCommand.h"
// cmAddCustomTargetCommand // cmAddCustomTargetCommand
bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string>& args) bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
std::vector<std::string> args = argsIn;
bool all = false; bool all = false;
if(args.size() < 2 ) if(args.size() < 2 )

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAddDefinitionsCommand.h" #include "cmAddDefinitionsCommand.h"
// cmAddDefinitionsCommand // cmAddDefinitionsCommand
bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string>& args) bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
std::string str = *i; std::string str = *i;

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmDependenciesCommand // cmDependenciesCommand
bool cmAddDependenciesCommand::InitialPass(std::vector<std::string>& args) bool cmAddDependenciesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -53,7 +53,7 @@ bool cmAddDependenciesCommand::InitialPass(std::vector<std::string>& args)
cmTargets &tgts = m_Makefile->GetTargets(); cmTargets &tgts = m_Makefile->GetTargets();
if (tgts.find(args[0]) != tgts.end()) if (tgts.find(args[0]) != tgts.end())
{ {
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
++s; ++s;
for (; s != args.end(); ++s) for (; s != args.end(); ++s)
{ {

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmExecutableCommand // cmExecutableCommand
bool cmAddExecutableCommand::InitialPass(std::vector<std::string>& args) bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -50,7 +50,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string>& args)
return false; return false;
} }
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
++s; ++s;
if (*s == "WIN32") if (*s == "WIN32")
{ {

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmLibraryCommand // cmLibraryCommand
bool cmAddLibraryCommand::InitialPass(std::vector<std::string>& args) bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -54,7 +54,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string>& args)
// otherwise it defaults to static library. // otherwise it defaults to static library.
int shared = !cmSystemTools::IsOff(m_Makefile->GetDefinition("BUILD_SHARED_LIBS")); int shared = !cmSystemTools::IsOff(m_Makefile->GetDefinition("BUILD_SHARED_LIBS"));
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
++s; ++s;
// If the second argument is "SHARED" or "STATIC", then it controls // If the second argument is "SHARED" or "STATIC", then it controls

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmExecutableCommand // cmExecutableCommand
bool cmAddTestCommand::InitialPass(std::vector<std::string>& args) bool cmAddTestCommand::InitialPass(std::vector<std::string> const& args)
{ {
// First argument is the name of the test // First argument is the name of the test
// Second argument is the name of the executable to run (a target or external // Second argument is the name of the executable to run (a target or external

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This is called at the end after all the information * This is called at the end after all the information

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmDirectory.h" #include "cmDirectory.h"
// cmAuxSourceDirectoryCommand // cmAuxSourceDirectoryCommand
bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string>& args) bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 || args.size() > 2) if(args.size() < 2 || args.size() > 2)
{ {

View File

@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmBuildCommand.h" #include "cmBuildCommand.h"
// cmBuildCommand // cmBuildCommand
bool cmBuildCommand::InitialPass(std::vector<std::string>& args) bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -56,7 +56,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
return true; return true;
} }
std::string makecommand; std::string makecommand;
std::string& makeprogram = args[1]; std::string makeprogram = args[1];
m_Makefile->ExpandVariablesInString(makeprogram); m_Makefile->ExpandVariablesInString(makeprogram);
if(makeprogram.find("msdev") != std::string::npos || if(makeprogram.find("msdev") != std::string::npos ||
makeprogram.find("MSDEV") != std::string::npos ) makeprogram.find("MSDEV") != std::string::npos )

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmBuildNameCommand.h" #include "cmBuildNameCommand.h"
// cmBuildNameCommand // cmBuildNameCommand
bool cmBuildNameCommand::InitialPass(std::vector<std::string>& args) bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -43,14 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmTarget.h" #include "cmTarget.h"
// cmCableClassSetCommand // cmCableClassSetCommand
bool cmCableClassSetCommand::InitialPass(std::vector<std::string>& args) bool cmCableClassSetCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
if(args.size() < 2) if(argsIn.size() < 2)
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
std::vector<std::string> args = argsIn;
// First, we want to expand all CMAKE variables in all arguments. // First, we want to expand all CMAKE variables in all arguments.
for(std::vector<std::string>::iterator a = args.begin(); for(std::vector<std::string>::iterator a = args.begin();
a != args.end(); ++a) a != args.end(); ++a)

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -118,13 +118,14 @@ cmCableWrapTclCommand::~cmCableWrapTclCommand()
// cmCableWrapTclCommand // cmCableWrapTclCommand
bool cmCableWrapTclCommand::InitialPass(std::vector<std::string>& args) bool cmCableWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
if(args.size() < 2) if(argsIn.size() < 2)
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
std::vector<std::string> args = argsIn;
// First, we want to expand all CMAKE variables in all arguments. // First, we want to expand all CMAKE variables in all arguments.
for(std::vector<std::string>::iterator a = args.begin(); for(std::vector<std::string>::iterator a = args.begin();

View File

@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -78,7 +78,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args) = 0; virtual bool InitialPass(std::vector<std::string> const& args) = 0;
/** /**
* This is called at the end after all the information * This is called at the end after all the information

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmConfigureFileCommand.h" #include "cmConfigureFileCommand.h"
// cmConfigureFileCommand // cmConfigureFileCommand
bool cmConfigureFileCommand::InitialPass(std::vector<std::string>& args) bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {

View File

@ -56,7 +56,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the input file. * the input file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -50,7 +50,7 @@ cmConfigureGccXmlCommand::~cmConfigureGccXmlCommand()
} }
// cmConfigureGccXmlCommand // cmConfigureGccXmlCommand
bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string>& args) bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() != 2) if(args.size() != 2)
{ {

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmElseCommand.h" #include "cmElseCommand.h"
#include "cmCacheManager.h" #include "cmCacheManager.h"
bool cmElseCommand::InitialPass(std::vector<std::string>& args) bool cmElseCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -109,7 +109,7 @@ bool cmElseCommand::InitialPass(std::vector<std::string>& args)
// if we created a function blocker then set its args // if we created a function blocker then set its args
if (f) if (f)
{ {
for(std::vector<std::string>::iterator j = args.begin(); for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j) j != args.end(); ++j)
{ {
f->m_Args.push_back(*j); f->m_Args.push_back(*j);

View File

@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -76,7 +76,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args) { virtual bool InitialPass(std::vector<std::string> const& args) {
return true;}; return true;};
/** /**

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmEndForEachCommand.h" #include "cmEndForEachCommand.h"
#include "cmCacheManager.h" #include "cmCacheManager.h"
bool cmEndForEachCommand::InitialPass(std::vector<std::string>& args) bool cmEndForEachCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmEndIfCommand.h" #include "cmEndIfCommand.h"
#include "cmCacheManager.h" #include "cmCacheManager.h"
bool cmEndIfCommand::InitialPass(std::vector<std::string>& args) bool cmEndIfCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {

View File

@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h" #include "cmSystemTools.h"
// cmExecProgramCommand // cmExecProgramCommand
bool cmExecProgramCommand::InitialPass(std::vector<std::string>& args) bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
std::vector<std::string> args = argsIn;
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// cmFindFileCommand // cmFindFileCommand
bool cmFindFileCommand::InitialPass(std::vector<std::string>& args) bool cmFindFileCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -53,7 +53,7 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string>& args)
return false; return false;
} }
std::vector<std::string>::iterator i = args.begin(); std::vector<std::string>::const_iterator i = args.begin();
// Use the first argument as the name of something to be defined // Use the first argument as the name of something to be defined
const char* define = (*i).c_str(); const char* define = (*i).c_str();
i++; // move iterator to next arg i++; // move iterator to next arg

View File

@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmFindLibraryCommand // cmFindLibraryCommand
bool cmFindLibraryCommand::InitialPass(std::vector<std::string>& args) bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
std::vector<std::string> args = argsIn;
if(args.size() < 2) if(args.size() < 2)
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");

View File

@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmFindPathCommand // cmFindPathCommand
bool cmFindPathCommand::InitialPass(std::vector<std::string>& args) bool cmFindPathCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {

View File

@ -42,7 +42,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -45,13 +45,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// cmFindProgramCommand // cmFindProgramCommand
bool cmFindProgramCommand::InitialPass(std::vector<std::string>& args) bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
if(args.size() < 2 ) if(argsIn.size() < 2 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
std::vector<std::string> args = argsIn;
std::vector<std::string>::iterator i = args.begin(); std::vector<std::string>::iterator i = args.begin();
// Use the first argument as the name of something to be defined // Use the first argument as the name of something to be defined
const char* define = (*i).c_str(); const char* define = (*i).c_str();

View File

@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -109,7 +109,7 @@ ScopeEnded(cmMakefile &mf)
mf.GetCurrentDirectory()); mf.GetCurrentDirectory());
} }
bool cmForEachCommand::InitialPass(std::vector<std::string>& args) bool cmForEachCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -119,7 +119,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string>& args)
// create a function blocker // create a function blocker
cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker(); cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker();
for(std::vector<std::string>::iterator j = args.begin(); for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j) j != args.end(); ++j)
{ {
f->m_Args.push_back(*j); f->m_Args.push_back(*j);

View File

@ -88,7 +88,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h" #include "cmSystemTools.h"
// cmGetFilenameComponentCommand // cmGetFilenameComponentCommand
bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string>& args) bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 3) if(args.size() < 3)
{ {

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -69,7 +69,7 @@ ScopeEnded(cmMakefile &mf)
mf.GetCurrentDirectory()); mf.GetCurrentDirectory());
} }
bool cmIfCommand::InitialPass(std::vector<std::string>& args) bool cmIfCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -137,7 +137,7 @@ bool cmIfCommand::InitialPass(std::vector<std::string>& args)
// if we created a function blocker then set its args // if we created a function blocker then set its args
if (f) if (f)
{ {
for(std::vector<std::string>::iterator j = args.begin(); for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j) j != args.end(); ++j)
{ {
f->m_Args.push_back(*j); f->m_Args.push_back(*j);

View File

@ -86,7 +86,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -17,14 +17,14 @@
// cmIncludeCommand // cmIncludeCommand
bool cmIncludeCommand::InitialPass(std::vector<std::string>& args) bool cmIncludeCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
if (args.size()< 1 || args.size() > 2) if (argsIn.size()< 1 || argsIn.size() > 2)
{ {
this->SetError("called with wrong number of arguments. " this->SetError("called with wrong number of arguments. "
"Include only takes one file."); "Include only takes one file.");
} }
std::vector<std::string> args = argsIn;
m_Makefile->ExpandVariablesInString( args[0]); m_Makefile->ExpandVariablesInString( args[0]);
bool exists = cmSystemTools::FileExists(args[0].c_str()); bool exists = cmSystemTools::FileExists(args[0].c_str());
if(args.size() == 2 && args[1] == "OPTIONAL" && !exists) if(args.size() == 2 && args[1] == "OPTIONAL" && !exists)

View File

@ -42,7 +42,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmIncludeDirectoryCommand.h" #include "cmIncludeDirectoryCommand.h"
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmIncludeDirectoryCommand // cmIncludeDirectoryCommand
bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string>& args) bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
m_Makefile->AddIncludeDirectory((*i).c_str()); m_Makefile->AddIncludeDirectory((*i).c_str());

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmIncludeRegularExpressionCommand.h" #include "cmIncludeRegularExpressionCommand.h"
// cmIncludeRegularExpressionCommand // cmIncludeRegularExpressionCommand
bool cmIncludeRegularExpressionCommand::InitialPass(std::vector<std::string>& args) bool cmIncludeRegularExpressionCommand::InitialPass(std::vector<std::string> const& args)
{ {
if((args.size() < 1) || (args.size() > 2)) if((args.size() < 1) || (args.size() > 2))
{ {

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallFilesCommand::InitialPass(std::vector<std::string>& args) bool cmInstallFilesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -58,7 +58,7 @@ bool cmInstallFilesCommand::InitialPass(std::vector<std::string>& args)
target.SetInstallPath(args[0].c_str()); target.SetInstallPath(args[0].c_str());
m_Makefile->GetTargets().insert(cmTargets::value_type(m_TargetName, target)); m_Makefile->GetTargets().insert(cmTargets::value_type(m_TargetName, target));
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
for (++s;s != args.end(); ++s) for (++s;s != args.end(); ++s)
{ {
m_FinalArgs.push_back(*s); m_FinalArgs.push_back(*s);

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallProgramsCommand::InitialPass(std::vector<std::string>& args) bool cmInstallProgramsCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -58,7 +58,7 @@ bool cmInstallProgramsCommand::InitialPass(std::vector<std::string>& args)
target.SetInstallPath(args[0].c_str()); target.SetInstallPath(args[0].c_str());
m_Makefile->GetTargets().insert(cmTargets::value_type(m_TargetName, target)); m_Makefile->GetTargets().insert(cmTargets::value_type(m_TargetName, target));
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
for (++s;s != args.end(); ++s) for (++s;s != args.end(); ++s)
{ {
m_FinalArgs.push_back(*s); m_FinalArgs.push_back(*s);

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallTargetsCommand::InitialPass(std::vector<std::string>& args) bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -51,7 +51,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string>& args)
} }
cmTargets &tgts = m_Makefile->GetTargets(); cmTargets &tgts = m_Makefile->GetTargets();
std::vector<std::string>::iterator s = args.begin(); std::vector<std::string>::const_iterator s = args.begin();
++s; ++s;
for (;s != args.end(); ++s) for (;s != args.end(); ++s)
{ {

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmLinkDirectoriesCommand.h" #include "cmLinkDirectoriesCommand.h"
// cmLinkDirectoriesCommand // cmLinkDirectoriesCommand
bool cmLinkDirectoriesCommand::InitialPass(std::vector<std::string>& args) bool cmLinkDirectoriesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
m_Makefile->AddLinkDirectory((*i).c_str()); m_Makefile->AddLinkDirectory((*i).c_str());

View File

@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmLinkLibrariesCommand.h" #include "cmLinkLibrariesCommand.h"
// cmLinkLibrariesCommand // cmLinkLibrariesCommand
bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string>& args) bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -50,7 +50,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string>& args)
} }
// add libraries, nothe that there is an optional prefix // add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used // of debug and optimized than can be used
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
if (*i == "debug") if (*i == "debug")

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -17,12 +17,13 @@
// cmLoadcacheCommand // cmLoadcacheCommand
bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args) bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
if (args.size()< 1) if (argsIn.size()< 1)
{ {
this->SetError("called with wrong number of arguments."); this->SetError("called with wrong number of arguments.");
} }
std::vector<std::string> args = argsIn;
// Cache entries to be excluded from the import list. // Cache entries to be excluded from the import list.
// If this set is empty, all cache entries are brought in // If this set is empty, all cache entries are brought in

View File

@ -61,7 +61,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -42,15 +42,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmDirectory.h" #include "cmDirectory.h"
// cmMakeDirectoryCommand // cmMakeDirectoryCommand
bool cmMakeDirectoryCommand::InitialPass(std::vector<std::string>& args) bool cmMakeDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
m_Makefile->ExpandVariablesInString(args[0]); std::string arg = args[0];
cmSystemTools::MakeDirectory(args[0].c_str()); m_Makefile->ExpandVariablesInString(arg);
cmSystemTools::MakeDirectory(arg.c_str());
return true; return true;
} }

View File

@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -217,7 +217,7 @@ void cmMakefile::Print() const
void cmMakefile::ExecuteCommand(std::string &name, void cmMakefile::ExecuteCommand(std::string &name,
std::vector<std::string> &arguments) std::vector<std::string> const& arguments)
{ {
RegisteredCommandsMap::iterator pos = m_Commands.find(name); RegisteredCommandsMap::iterator pos = m_Commands.find(name);
if(pos != m_Commands.end()) if(pos != m_Commands.end())
@ -336,16 +336,14 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external)
// add this list file to the list of dependencies // add this list file to the list of dependencies
m_ListFiles.push_back( filenametoread); m_ListFiles.push_back( filenametoread);
const int numberFunctions = lf->m_Functions.size(); const int numberFunctions = lf->m_Functions.size();
std::vector<std::string> argumentsCopy;
for(int i =0; i < numberFunctions; ++i) for(int i =0; i < numberFunctions; ++i)
{ {
cmListFileFunction& curFunction = lf->m_Functions[i]; cmListFileFunction& curFunction = lf->m_Functions[i];
if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(), if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(),
curFunction.m_Arguments)) curFunction.m_Arguments))
{ {
argumentsCopy = curFunction.m_Arguments;
this->ExecuteCommand(curFunction.m_Name, this->ExecuteCommand(curFunction.m_Name,
argumentsCopy); curFunction.m_Arguments);
} }
} }
@ -1149,7 +1147,7 @@ cmMakefile::FindSourceGroup(const char* source,
bool cmMakefile::IsFunctionBlocked(const char *name, bool cmMakefile::IsFunctionBlocked(const char *name,
std::vector<std::string> &args) std::vector<std::string> const&args)
{ {
// loop over all function blockers to see if any block this command // loop over all function blockers to see if any block this command
std::set<cmFunctionBlocker *>::const_iterator pos; std::set<cmFunctionBlocker *>::const_iterator pos;

View File

@ -540,7 +540,7 @@ public:
/** /**
* execute a single CMake command * execute a single CMake command
*/ */
void ExecuteCommand(std::string &name, std::vector<std::string> &args); void ExecuteCommand(std::string &name, std::vector<std::string> const& args);
protected: protected:
@ -590,7 +590,7 @@ protected:
RegisteredCommandsMap m_Commands; RegisteredCommandsMap m_Commands;
std::vector<cmCommand*> m_UsedCommands; std::vector<cmCommand*> m_UsedCommands;
cmMakefileGenerator* m_MakefileGenerator; cmMakefileGenerator* m_MakefileGenerator;
bool IsFunctionBlocked(const char *name, std::vector<std::string> &args); bool IsFunctionBlocked(const char *name, std::vector<std::string> const& args);
private: private:
/** /**

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmLibraryCommand // cmLibraryCommand
bool cmMessageCommand::InitialPass(std::vector<std::string>& args) bool cmMessageCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -53,7 +53,7 @@ bool cmMessageCommand::InitialPass(std::vector<std::string>& args)
if (args.size() >= 2) if (args.size() >= 2)
{ {
std::string message; std::string message;
std::vector<std::string>::iterator i = args.begin(); std::vector<std::string>::const_iterator i = args.begin();
++i; ++i;
for(;i != args.end(); ++i) for(;i != args.end(); ++i)
{ {

View File

@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmOptionCommand.h" #include "cmOptionCommand.h"
// cmOptionCommand // cmOptionCommand
bool cmOptionCommand::InitialPass(std::vector<std::string>& args) bool cmOptionCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -181,7 +181,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
} }
// cmOutputRequiredFilesCommand // cmOutputRequiredFilesCommand
bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string>& args) bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {

View File

@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
virtual void FinalPass(); virtual void FinalPass();

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmProjectCommand.h" #include "cmProjectCommand.h"
// cmProjectCommand // cmProjectCommand
bool cmProjectCommand::InitialPass(std::vector<std::string>& args) bool cmProjectCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 || args.size() > 1) if(args.size() < 1 || args.size() > 1)
{ {

View File

@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSetCommand.h" #include "cmSetCommand.h"
// cmSetCommand // cmSetCommand
bool cmSetCommand::InitialPass(std::vector<std::string>& args) bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -90,7 +90,7 @@ bool cmSetCommand::InitialPass(std::vector<std::string>& args)
message += "Syntax error in SET:\n"; message += "Syntax error in SET:\n";
message += "CACHE requires TYPE and document string SET command:\n"; message += "CACHE requires TYPE and document string SET command:\n";
message += "SET ("; message += "SET (";
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
message += *i; message += *i;

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSiteNameCommand.h" #include "cmSiteNameCommand.h"
// cmSiteNameCommand // cmSiteNameCommand
bool cmSiteNameCommand::InitialPass(std::vector<std::string>& args) bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {

View File

@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* This determines if the command gets propagated down * This determines if the command gets propagated down

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceFilesCommand.h" #include "cmSourceFilesCommand.h"
// cmSourceFilesCommand // cmSourceFilesCommand
bool cmSourceFilesCommand::InitialPass(std::vector<std::string>& args) bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = (args.begin() + 1); for(std::vector<std::string>::const_iterator i = (args.begin() + 1);
i != args.end(); ++i) i != args.end(); ++i)
{ {
std::string copy = *i; std::string copy = *i;

View File

@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceFilesRemoveCommand.h" #include "cmSourceFilesRemoveCommand.h"
// cmSourceFilesRemoveCommand // cmSourceFilesRemoveCommand
bool cmSourceFilesRemoveCommand::InitialPass(std::vector<std::string>& args) bool cmSourceFilesRemoveCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = (args.begin() + 1); for(std::vector<std::string>::const_iterator i = (args.begin() + 1);
i != args.end(); ++i) i != args.end(); ++i)
{ {
cmSourceFile file; cmSourceFile file;

View File

@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceGroupCommand.h" #include "cmSourceGroupCommand.h"
// cmSourceGroupCommand // cmSourceGroupCommand
bool cmSourceGroupCommand::InitialPass(std::vector<std::string>& args) bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() != 2) if(args.size() != 2)
{ {

View File

@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSubdirCommand.h" #include "cmSubdirCommand.h"
// cmSubdirCommand // cmSubdirCommand
bool cmSubdirCommand::InitialPass(std::vector<std::string>& args) bool cmSubdirCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
for(std::vector<std::string>::iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
{ {
m_Makefile->AddSubDirectory((*i).c_str()); m_Makefile->AddSubDirectory((*i).c_str());

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSubdirDependsCommand.h" #include "cmSubdirDependsCommand.h"
// cmSubdirDependsCommand // cmSubdirDependsCommand
bool cmSubdirDependsCommand::InitialPass(std::vector<std::string>& args) bool cmSubdirDependsCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {

View File

@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmTargetLinkLibrariesCommand.h" #include "cmTargetLinkLibrariesCommand.h"
// cmTargetLinkLibrariesCommand // cmTargetLinkLibrariesCommand
bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string>& args) bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -50,7 +50,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string>& args)
} }
// add libraries, nothe that there is an optional prefix // add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used // of debug and optimized than can be used
std::vector<std::string>::iterator i = args.begin(); std::vector<std::string>::const_iterator i = args.begin();
for(++i; i != args.end(); ++i) for(++i; i != args.end(); ++i)
{ {

View File

@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in * This is called when the command is first encountered in
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool InitialPass(std::vector<std::string>& args); virtual bool InitialPass(std::vector<std::string> const& args);
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@ -42,16 +42,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h" #include "cmSystemTools.h"
// cmUseMangledMesaCommand // cmUseMangledMesaCommand
bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string>& args) bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& argsIn)
{ {
// expected two arguments: // expected two arguments:
// arguement one: the full path to gl_mangle.h // arguement one: the full path to gl_mangle.h
// arguement two : directory for output of edited headers // arguement two : directory for output of edited headers
if(args.size() < 2) if(argsIn.size() < 2)
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;
} }
std::vector<std::string> args = argsIn;
m_Makefile->ExpandVariablesInString(args[0]); m_Makefile->ExpandVariablesInString(args[0]);
m_Makefile->ExpandVariablesInString(args[1]); m_Makefile->ExpandVariablesInString(args[1]);
const char* inputDir = args[0].c_str(); const char* inputDir = args[0].c_str();

Some files were not shown because too many files have changed in this diff Show More