summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-09-20 15:08:30 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-09-20 15:08:30 -0400
commitbaa28efd107a3efa821034a64a1c737d3c58ad89 (patch)
tree37ea066736ad3ccf45c83e39894526bc817e1e71
parentb9d56e8497b26485d6ea56fa5b781f24260f2038 (diff)
downloadcmake-baa28efd107a3efa821034a64a1c737d3c58ad89.tar.gz
ENH: change InitialPass to take a const reference to the argument string, to avoid changes to the file cache
-rw-r--r--Source/cmAbstractFilesCommand.cxx4
-rw-r--r--Source/cmAbstractFilesCommand.h2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx3
-rw-r--r--Source/cmAddCustomTargetCommand.h2
-rw-r--r--Source/cmAddDefinitionsCommand.cxx4
-rw-r--r--Source/cmAddDefinitionsCommand.h2
-rw-r--r--Source/cmAddDependenciesCommand.cxx4
-rw-r--r--Source/cmAddDependenciesCommand.h2
-rw-r--r--Source/cmAddExecutableCommand.cxx4
-rw-r--r--Source/cmAddExecutableCommand.h2
-rw-r--r--Source/cmAddLibraryCommand.cxx4
-rw-r--r--Source/cmAddLibraryCommand.h2
-rw-r--r--Source/cmAddTestCommand.cxx2
-rw-r--r--Source/cmAddTestCommand.h2
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx2
-rw-r--r--Source/cmAuxSourceDirectoryCommand.h2
-rw-r--r--Source/cmBuildCommand.cxx4
-rw-r--r--Source/cmBuildCommand.h2
-rw-r--r--Source/cmBuildNameCommand.cxx2
-rw-r--r--Source/cmBuildNameCommand.h2
-rw-r--r--Source/cmCableClassSetCommand.cxx6
-rw-r--r--Source/cmCableClassSetCommand.h2
-rw-r--r--Source/cmCableWrapTclCommand.cxx5
-rw-r--r--Source/cmCableWrapTclCommand.h2
-rw-r--r--Source/cmCommand.h2
-rw-r--r--Source/cmConfigureFileCommand.cxx2
-rw-r--r--Source/cmConfigureFileCommand.h2
-rw-r--r--Source/cmConfigureGccXmlCommand.cxx2
-rw-r--r--Source/cmConfigureGccXmlCommand.h2
-rw-r--r--Source/cmElseCommand.cxx4
-rw-r--r--Source/cmElseCommand.h2
-rw-r--r--Source/cmEnableTestingCommand.h2
-rw-r--r--Source/cmEndForEachCommand.cxx2
-rw-r--r--Source/cmEndForEachCommand.h2
-rw-r--r--Source/cmEndIfCommand.cxx2
-rw-r--r--Source/cmEndIfCommand.h2
-rw-r--r--Source/cmExecProgramCommand.cxx3
-rw-r--r--Source/cmExecProgramCommand.h2
-rw-r--r--Source/cmFindFileCommand.cxx4
-rw-r--r--Source/cmFindFileCommand.h2
-rw-r--r--Source/cmFindLibraryCommand.cxx3
-rw-r--r--Source/cmFindLibraryCommand.h2
-rw-r--r--Source/cmFindPathCommand.cxx2
-rw-r--r--Source/cmFindPathCommand.h2
-rw-r--r--Source/cmFindProgramCommand.cxx5
-rw-r--r--Source/cmFindProgramCommand.h2
-rw-r--r--Source/cmForEachCommand.cxx4
-rw-r--r--Source/cmForEachCommand.h2
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx2
-rw-r--r--Source/cmGetFilenameComponentCommand.h2
-rw-r--r--Source/cmIfCommand.cxx4
-rw-r--r--Source/cmIfCommand.h2
-rw-r--r--Source/cmIncludeCommand.cxx6
-rw-r--r--Source/cmIncludeCommand.h2
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx4
-rw-r--r--Source/cmIncludeDirectoryCommand.h2
-rw-r--r--Source/cmIncludeRegularExpressionCommand.cxx2
-rw-r--r--Source/cmIncludeRegularExpressionCommand.h2
-rw-r--r--Source/cmInstallFilesCommand.cxx4
-rw-r--r--Source/cmInstallFilesCommand.h2
-rw-r--r--Source/cmInstallProgramsCommand.cxx4
-rw-r--r--Source/cmInstallProgramsCommand.h2
-rw-r--r--Source/cmInstallTargetsCommand.cxx4
-rw-r--r--Source/cmInstallTargetsCommand.h2
-rw-r--r--Source/cmLibraryCommand.h2
-rw-r--r--Source/cmLinkDirectoriesCommand.cxx4
-rw-r--r--Source/cmLinkDirectoriesCommand.h2
-rw-r--r--Source/cmLinkLibrariesCommand.cxx4
-rw-r--r--Source/cmLinkLibrariesCommand.h2
-rw-r--r--Source/cmLoadCacheCommand.cxx5
-rw-r--r--Source/cmLoadCacheCommand.h2
-rw-r--r--Source/cmMakeDirectoryCommand.cxx7
-rw-r--r--Source/cmMakeDirectoryCommand.h2
-rw-r--r--Source/cmMakefile.cxx8
-rw-r--r--Source/cmMakefile.h4
-rw-r--r--Source/cmMessageCommand.cxx4
-rw-r--r--Source/cmMessageCommand.h2
-rw-r--r--Source/cmOptionCommand.cxx2
-rw-r--r--Source/cmOptionCommand.h2
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx2
-rw-r--r--Source/cmOutputRequiredFilesCommand.h2
-rw-r--r--Source/cmProjectCommand.cxx2
-rw-r--r--Source/cmProjectCommand.h2
-rw-r--r--Source/cmSetCommand.cxx4
-rw-r--r--Source/cmSetCommand.h2
-rw-r--r--Source/cmSiteNameCommand.cxx2
-rw-r--r--Source/cmSiteNameCommand.h2
-rw-r--r--Source/cmSourceFilesCommand.cxx4
-rw-r--r--Source/cmSourceFilesCommand.h2
-rw-r--r--Source/cmSourceFilesRemoveCommand.cxx4
-rw-r--r--Source/cmSourceFilesRemoveCommand.h2
-rw-r--r--Source/cmSourceGroupCommand.cxx2
-rw-r--r--Source/cmSourceGroupCommand.h2
-rw-r--r--Source/cmSubdirCommand.cxx4
-rw-r--r--Source/cmSubdirCommand.h2
-rw-r--r--Source/cmSubdirDependsCommand.cxx2
-rw-r--r--Source/cmSubdirDependsCommand.h2
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx4
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h2
-rw-r--r--Source/cmUseMangledMesaCommand.cxx5
-rw-r--r--Source/cmUseMangledMesaCommand.h2
-rw-r--r--Source/cmUtilitySourceCommand.cxx2
-rw-r--r--Source/cmUtilitySourceCommand.h2
-rw-r--r--Source/cmVTKWrapJavaCommand.cxx4
-rw-r--r--Source/cmVTKWrapJavaCommand.h2
-rw-r--r--Source/cmVTKWrapPythonCommand.cxx4
-rw-r--r--Source/cmVTKWrapPythonCommand.h2
-rw-r--r--Source/cmVTKWrapTclCommand.cxx4
-rw-r--r--Source/cmVTKWrapTclCommand.h2
-rw-r--r--Source/cmWrapExcludeFilesCommand.cxx4
-rw-r--r--Source/cmWrapExcludeFilesCommand.h2
111 files changed, 158 insertions, 152 deletions
diff --git a/Source/cmAbstractFilesCommand.cxx b/Source/cmAbstractFilesCommand.cxx
index 7b35fc6aef..2c481c3ea4 100644
--- a/Source/cmAbstractFilesCommand.cxx
+++ b/Source/cmAbstractFilesCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAbstractFilesCommand.h"
// cmAbstractFilesCommand
-bool cmAbstractFilesCommand::InitialPass(std::vector<std::string>& args)
+bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -49,7 +49,7 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string>& args)
return false;
}
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)
{
for(cmMakefile::SourceMap::iterator l = Classes.begin();
diff --git a/Source/cmAbstractFilesCommand.h b/Source/cmAbstractFilesCommand.h
index 6d0dafa1cb..7d3f17330f 100644
--- a/Source/cmAbstractFilesCommand.h
+++ b/Source/cmAbstractFilesCommand.h
@@ -56,7 +56,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 070c1afad3..18016f8385 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -41,8 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAddCustomTargetCommand.h"
// 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;
if(args.size() < 2 )
diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h
index 3acf4ce886..2c293c40fc 100644
--- a/Source/cmAddCustomTargetCommand.h
+++ b/Source/cmAddCustomTargetCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx
index 19a0ad7ae5..9afe7bbfa5 100644
--- a/Source/cmAddDefinitionsCommand.cxx
+++ b/Source/cmAddDefinitionsCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmAddDefinitionsCommand.h"
// cmAddDefinitionsCommand
-bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string>& args)
+bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
std::string str = *i;
diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h
index e593ed4096..ec28072e4d 100644
--- a/Source/cmAddDefinitionsCommand.h
+++ b/Source/cmAddDefinitionsCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx
index baa08e42e7..11dcc95248 100644
--- a/Source/cmAddDependenciesCommand.cxx
+++ b/Source/cmAddDependenciesCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmDependenciesCommand
-bool cmAddDependenciesCommand::InitialPass(std::vector<std::string>& args)
+bool cmAddDependenciesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
@@ -53,7 +53,7 @@ bool cmAddDependenciesCommand::InitialPass(std::vector<std::string>& args)
cmTargets &tgts = m_Makefile->GetTargets();
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;
for (; s != args.end(); ++s)
{
diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h
index 8eff6fe373..5a60a21564 100644
--- a/Source/cmAddDependenciesCommand.h
+++ b/Source/cmAddDependenciesCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 83136a23bc..b1ce21fbb9 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmExecutableCommand
-bool cmAddExecutableCommand::InitialPass(std::vector<std::string>& args)
+bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
@@ -50,7 +50,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string>& args)
return false;
}
- std::vector<std::string>::iterator s = args.begin();
+ std::vector<std::string>::const_iterator s = args.begin();
++s;
if (*s == "WIN32")
{
diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h
index 421a32e2d4..22ebc12ffb 100644
--- a/Source/cmAddExecutableCommand.h
+++ b/Source/cmAddExecutableCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index f75e909ecf..cf3d68eae2 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmLibraryCommand
-bool cmAddLibraryCommand::InitialPass(std::vector<std::string>& args)
+bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -54,7 +54,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string>& args)
// otherwise it defaults to static library.
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;
// If the second argument is "SHARED" or "STATIC", then it controls
diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h
index 9ec8a82257..7860419398 100644
--- a/Source/cmAddLibraryCommand.h
+++ b/Source/cmAddLibraryCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx
index e7d16b4a05..481be7e6db 100644
--- a/Source/cmAddTestCommand.cxx
+++ b/Source/cmAddTestCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// 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
// Second argument is the name of the executable to run (a target or external
diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h
index 6f0e272e6f..4c9870e8c5 100644
--- a/Source/cmAddTestCommand.h
+++ b/Source/cmAddTestCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 1639ce0df5..89614a2bed 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmDirectory.h"
// 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)
{
diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h
index 893681bf9a..52aa21061b 100644
--- a/Source/cmAuxSourceDirectoryCommand.h
+++ b/Source/cmAuxSourceDirectoryCommand.h
@@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 528c365ccd..18037b497f 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmBuildCommand.h"
// cmBuildCommand
-bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
+bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
@@ -56,7 +56,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
return true;
}
std::string makecommand;
- std::string& makeprogram = args[1];
+ std::string makeprogram = args[1];
m_Makefile->ExpandVariablesInString(makeprogram);
if(makeprogram.find("msdev") != std::string::npos ||
makeprogram.find("MSDEV") != std::string::npos )
diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h
index 38be6fcb5a..5043459b0d 100644
--- a/Source/cmBuildCommand.h
+++ b/Source/cmBuildCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index 5016825bf1..ca17210359 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmBuildNameCommand.h"
// cmBuildNameCommand
-bool cmBuildNameCommand::InitialPass(std::vector<std::string>& args)
+bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h
index f2dce71d0b..4d9a6bb529 100644
--- a/Source/cmBuildNameCommand.h
+++ b/Source/cmBuildNameCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmCableClassSetCommand.cxx b/Source/cmCableClassSetCommand.cxx
index ba2265735b..28ea366d97 100644
--- a/Source/cmCableClassSetCommand.cxx
+++ b/Source/cmCableClassSetCommand.cxx
@@ -43,14 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmTarget.h"
// 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");
return false;
}
-
+ std::vector<std::string> args = argsIn;
// First, we want to expand all CMAKE variables in all arguments.
for(std::vector<std::string>::iterator a = args.begin();
a != args.end(); ++a)
diff --git a/Source/cmCableClassSetCommand.h b/Source/cmCableClassSetCommand.h
index 7eab6a2032..bfa5747a59 100644
--- a/Source/cmCableClassSetCommand.h
+++ b/Source/cmCableClassSetCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx
index 19112f5707..8dd2ebe19c 100644
--- a/Source/cmCableWrapTclCommand.cxx
+++ b/Source/cmCableWrapTclCommand.cxx
@@ -118,13 +118,14 @@ 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");
return false;
}
+ std::vector<std::string> args = argsIn;
// First, we want to expand all CMAKE variables in all arguments.
for(std::vector<std::string>::iterator a = args.begin();
diff --git a/Source/cmCableWrapTclCommand.h b/Source/cmCableWrapTclCommand.h
index 24793c8a98..a1c801f70e 100644
--- a/Source/cmCableWrapTclCommand.h
+++ b/Source/cmCableWrapTclCommand.h
@@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index ee43675f09..b9cba5a81e 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -78,7 +78,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index bf49a82ee3..9f482d3951 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmConfigureFileCommand.h"
// cmConfigureFileCommand
-bool cmConfigureFileCommand::InitialPass(std::vector<std::string>& args)
+bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h
index ab624b0ef7..b052ffaf7a 100644
--- a/Source/cmConfigureFileCommand.h
+++ b/Source/cmConfigureFileCommand.h
@@ -56,7 +56,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmConfigureGccXmlCommand.cxx b/Source/cmConfigureGccXmlCommand.cxx
index 65f0d9f55c..bb4ac9d617 100644
--- a/Source/cmConfigureGccXmlCommand.cxx
+++ b/Source/cmConfigureGccXmlCommand.cxx
@@ -50,7 +50,7 @@ cmConfigureGccXmlCommand::~cmConfigureGccXmlCommand()
}
// cmConfigureGccXmlCommand
-bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string>& args)
+bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() != 2)
{
diff --git a/Source/cmConfigureGccXmlCommand.h b/Source/cmConfigureGccXmlCommand.h
index 7d71e0d664..a50baa3516 100644
--- a/Source/cmConfigureGccXmlCommand.h
+++ b/Source/cmConfigureGccXmlCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx
index 0f35203a92..12847cfe0b 100644
--- a/Source/cmElseCommand.cxx
+++ b/Source/cmElseCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmElseCommand.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 )
{
@@ -109,7 +109,7 @@ bool cmElseCommand::InitialPass(std::vector<std::string>& args)
// if we created a function blocker then set its args
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)
{
f->m_Args.push_back(*j);
diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h
index f4df774630..71ac225035 100644
--- a/Source/cmElseCommand.h
+++ b/Source/cmElseCommand.h
@@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h
index 12688f3bca..e3f66d0f47 100644
--- a/Source/cmEnableTestingCommand.h
+++ b/Source/cmEnableTestingCommand.h
@@ -76,7 +76,7 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
- virtual bool InitialPass(std::vector<std::string>& args) {
+ virtual bool InitialPass(std::vector<std::string> const& args) {
return true;};
/**
diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx
index 3bef15e2c7..e8b61984c7 100644
--- a/Source/cmEndForEachCommand.cxx
+++ b/Source/cmEndForEachCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmEndForEachCommand.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 )
{
diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h
index b34ba69d2c..7c453d94df 100644
--- a/Source/cmEndForEachCommand.h
+++ b/Source/cmEndForEachCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx
index 7972a1bbe3..e070c93785 100644
--- a/Source/cmEndIfCommand.cxx
+++ b/Source/cmEndIfCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmEndIfCommand.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 )
{
diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h
index 287b2e0562..d7361d98b4 100644
--- a/Source/cmEndIfCommand.h
+++ b/Source/cmEndIfCommand.h
@@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index f391b693de..0b8c85d9dd 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h"
// 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 )
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h
index 321e808062..9ee38dcba1 100644
--- a/Source/cmExecProgramCommand.h
+++ b/Source/cmExecProgramCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx
index 7a240fe456..b610a21b29 100644
--- a/Source/cmFindFileCommand.cxx
+++ b/Source/cmFindFileCommand.cxx
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// cmFindFileCommand
-bool cmFindFileCommand::InitialPass(std::vector<std::string>& args)
+bool cmFindFileCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
@@ -53,7 +53,7 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string>& args)
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
const char* define = (*i).c_str();
i++; // move iterator to next arg
diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h
index 371293722d..d245fa77a1 100644
--- a/Source/cmFindFileCommand.h
+++ b/Source/cmFindFileCommand.h
@@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 1a931bbc16..5e374f262f 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// 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)
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h
index 51a6bce96d..cd275b2cb6 100644
--- a/Source/cmFindLibraryCommand.h
+++ b/Source/cmFindLibraryCommand.h
@@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index 7b0550cc3c..c4abd4612e 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmFindPathCommand
-bool cmFindPathCommand::InitialPass(std::vector<std::string>& args)
+bool cmFindPathCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h
index d401d17738..048fc754ec 100644
--- a/Source/cmFindPathCommand.h
+++ b/Source/cmFindPathCommand.h
@@ -42,7 +42,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index 1195ea8baf..e6c7edc02f 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -45,13 +45,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// 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");
return false;
}
+ std::vector<std::string> args = argsIn;
std::vector<std::string>::iterator i = args.begin();
// Use the first argument as the name of something to be defined
const char* define = (*i).c_str();
diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h
index d23321edaa..060fb10cc1 100644
--- a/Source/cmFindProgramCommand.h
+++ b/Source/cmFindProgramCommand.h
@@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 7803da24b2..03f6d72a2a 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -109,7 +109,7 @@ ScopeEnded(cmMakefile &mf)
mf.GetCurrentDirectory());
}
-bool cmForEachCommand::InitialPass(std::vector<std::string>& args)
+bool cmForEachCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
@@ -119,7 +119,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string>& args)
// create a function blocker
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)
{
f->m_Args.push_back(*j);
diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h
index ee029d2f77..e496ac9d3c 100644
--- a/Source/cmForEachCommand.h
+++ b/Source/cmForEachCommand.h
@@ -88,7 +88,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 9b2000531d..390cef8b05 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h"
// cmGetFilenameComponentCommand
-bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string>& args)
+bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 3)
{
diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h
index 5d825feb28..19b8873388 100644
--- a/Source/cmGetFilenameComponentCommand.h
+++ b/Source/cmGetFilenameComponentCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 85a59dbf04..703f9e3432 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -69,7 +69,7 @@ ScopeEnded(cmMakefile &mf)
mf.GetCurrentDirectory());
}
-bool cmIfCommand::InitialPass(std::vector<std::string>& args)
+bool cmIfCommand::InitialPass(std::vector<std::string> const& args)
{
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 (f)
{
- for(std::vector<std::string>::iterator j = args.begin();
+ for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j)
{
f->m_Args.push_back(*j);
diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h
index 5355bc0ae6..9d8910fa8a 100644
--- a/Source/cmIfCommand.h
+++ b/Source/cmIfCommand.h
@@ -86,7 +86,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index 3c2d35df21..68eb6cc67d 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -17,14 +17,14 @@
// 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. "
"Include only takes one file.");
}
-
+ std::vector<std::string> args = argsIn;
m_Makefile->ExpandVariablesInString( args[0]);
bool exists = cmSystemTools::FileExists(args[0].c_str());
if(args.size() == 2 && args[1] == "OPTIONAL" && !exists)
diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h
index c60fbefb2e..854d833939 100644
--- a/Source/cmIncludeCommand.h
+++ b/Source/cmIncludeCommand.h
@@ -42,7 +42,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index 22b82cfd56..d56fe5c924 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmIncludeDirectoryCommand.h"
#include "cmCacheManager.h"
// cmIncludeDirectoryCommand
-bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string>& args)
+bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
m_Makefile->AddIncludeDirectory((*i).c_str());
diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h
index 755df69fa2..579e24a440 100644
--- a/Source/cmIncludeDirectoryCommand.h
+++ b/Source/cmIncludeDirectoryCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx
index 2ccc556ff1..b5c5861a0c 100644
--- a/Source/cmIncludeRegularExpressionCommand.cxx
+++ b/Source/cmIncludeRegularExpressionCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmIncludeRegularExpressionCommand.h"
// 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))
{
diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h
index fcec512f06..4cab776ccd 100644
--- a/Source/cmIncludeRegularExpressionCommand.h
+++ b/Source/cmIncludeRegularExpressionCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx
index b4cf57a4c7..6516fdb1af 100644
--- a/Source/cmInstallFilesCommand.cxx
+++ b/Source/cmInstallFilesCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmExecutableCommand
-bool cmInstallFilesCommand::InitialPass(std::vector<std::string>& args)
+bool cmInstallFilesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
@@ -58,7 +58,7 @@ bool cmInstallFilesCommand::InitialPass(std::vector<std::string>& args)
target.SetInstallPath(args[0].c_str());
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)
{
m_FinalArgs.push_back(*s);
diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h
index 070f703288..423727a612 100644
--- a/Source/cmInstallFilesCommand.h
+++ b/Source/cmInstallFilesCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index 657691b0dc..6b835580ff 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmExecutableCommand
-bool cmInstallProgramsCommand::InitialPass(std::vector<std::string>& args)
+bool cmInstallProgramsCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
@@ -58,7 +58,7 @@ bool cmInstallProgramsCommand::InitialPass(std::vector<std::string>& args)
target.SetInstallPath(args[0].c_str());
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)
{
m_FinalArgs.push_back(*s);
diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h
index 307bfb9856..082c75ca14 100644
--- a/Source/cmInstallProgramsCommand.h
+++ b/Source/cmInstallProgramsCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx
index 5e379c8789..cb27b0a9ca 100644
--- a/Source/cmInstallTargetsCommand.cxx
+++ b/Source/cmInstallTargetsCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmExecutableCommand
-bool cmInstallTargetsCommand::InitialPass(std::vector<std::string>& args)
+bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
@@ -51,7 +51,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string>& args)
}
cmTargets &tgts = m_Makefile->GetTargets();
- std::vector<std::string>::iterator s = args.begin();
+ std::vector<std::string>::const_iterator s = args.begin();
++s;
for (;s != args.end(); ++s)
{
diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h
index 03f48d1102..067e6e5f73 100644
--- a/Source/cmInstallTargetsCommand.h
+++ b/Source/cmInstallTargetsCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmLibraryCommand.h b/Source/cmLibraryCommand.h
index 793a254e86..e18d9d7248 100644
--- a/Source/cmLibraryCommand.h
+++ b/Source/cmLibraryCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx
index 8fd859a3a6..ab3b5306a1 100644
--- a/Source/cmLinkDirectoriesCommand.cxx
+++ b/Source/cmLinkDirectoriesCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmLinkDirectoriesCommand.h"
// cmLinkDirectoriesCommand
-bool cmLinkDirectoriesCommand::InitialPass(std::vector<std::string>& args)
+bool cmLinkDirectoriesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
m_Makefile->AddLinkDirectory((*i).c_str());
diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h
index 56455cb69c..ba1d5a8c31 100644
--- a/Source/cmLinkDirectoriesCommand.h
+++ b/Source/cmLinkDirectoriesCommand.h
@@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx
index 39a809690a..2e28dfadee 100644
--- a/Source/cmLinkLibrariesCommand.cxx
+++ b/Source/cmLinkLibrariesCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmLinkLibrariesCommand.h"
// cmLinkLibrariesCommand
-bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string>& args)
+bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
{
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
// 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)
{
if (*i == "debug")
diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h
index 1be241ef56..bd3bdc029a 100644
--- a/Source/cmLinkLibrariesCommand.h
+++ b/Source/cmLinkLibrariesCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index 93afbd6a58..e1445a923d 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -17,12 +17,13 @@
// 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.");
}
+ std::vector<std::string> args = argsIn;
// Cache entries to be excluded from the import list.
// If this set is empty, all cache entries are brought in
diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h
index 3a80af936d..859cecdbe5 100644
--- a/Source/cmLoadCacheCommand.h
+++ b/Source/cmLoadCacheCommand.h
@@ -61,7 +61,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx
index 22dd4af560..aac1a11b5c 100644
--- a/Source/cmMakeDirectoryCommand.cxx
+++ b/Source/cmMakeDirectoryCommand.cxx
@@ -42,15 +42,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmDirectory.h"
// cmMakeDirectoryCommand
-bool cmMakeDirectoryCommand::InitialPass(std::vector<std::string>& args)
+bool cmMakeDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
- m_Makefile->ExpandVariablesInString(args[0]);
- cmSystemTools::MakeDirectory(args[0].c_str());
+ std::string arg = args[0];
+ m_Makefile->ExpandVariablesInString(arg);
+ cmSystemTools::MakeDirectory(arg.c_str());
return true;
}
diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h
index 6f07096463..12f5dcf0a8 100644
--- a/Source/cmMakeDirectoryCommand.h
+++ b/Source/cmMakeDirectoryCommand.h
@@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d58f72d05e..f3e777e01c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -217,7 +217,7 @@ void cmMakefile::Print() const
void cmMakefile::ExecuteCommand(std::string &name,
- std::vector<std::string> &arguments)
+ std::vector<std::string> const& arguments)
{
RegisteredCommandsMap::iterator pos = m_Commands.find(name);
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
m_ListFiles.push_back( filenametoread);
const int numberFunctions = lf->m_Functions.size();
- std::vector<std::string> argumentsCopy;
for(int i =0; i < numberFunctions; ++i)
{
cmListFileFunction& curFunction = lf->m_Functions[i];
if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(),
curFunction.m_Arguments))
{
- argumentsCopy = curFunction.m_Arguments;
this->ExecuteCommand(curFunction.m_Name,
- argumentsCopy);
+ curFunction.m_Arguments);
}
}
@@ -1149,7 +1147,7 @@ cmMakefile::FindSourceGroup(const char* source,
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
std::set<cmFunctionBlocker *>::const_iterator pos;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 797e3643df..451cdda754 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -540,7 +540,7 @@ public:
/**
* 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:
@@ -590,7 +590,7 @@ protected:
RegisteredCommandsMap m_Commands;
std::vector<cmCommand*> m_UsedCommands;
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:
/**
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 7671bd3e67..bb28eabdf8 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
// cmLibraryCommand
-bool cmMessageCommand::InitialPass(std::vector<std::string>& args)
+bool cmMessageCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -53,7 +53,7 @@ bool cmMessageCommand::InitialPass(std::vector<std::string>& args)
if (args.size() >= 2)
{
std::string message;
- std::vector<std::string>::iterator i = args.begin();
+ std::vector<std::string>::const_iterator i = args.begin();
++i;
for(;i != args.end(); ++i)
{
diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h
index eb0ad36f85..67618fe545 100644
--- a/Source/cmMessageCommand.h
+++ b/Source/cmMessageCommand.h
@@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 3e167de1f3..92bd7d40de 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmOptionCommand.h"
// cmOptionCommand
-bool cmOptionCommand::InitialPass(std::vector<std::string>& args)
+bool cmOptionCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h
index 99baea52a8..76d6683253 100644
--- a/Source/cmOptionCommand.h
+++ b/Source/cmOptionCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index d796ad73ad..0c6e2a9bd9 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -181,7 +181,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
}
// cmOutputRequiredFilesCommand
-bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string>& args)
+bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2 )
{
diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h
index 440acb113f..e5da4316b1 100644
--- a/Source/cmOutputRequiredFilesCommand.h
+++ b/Source/cmOutputRequiredFilesCommand.h
@@ -63,7 +63,7 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
- virtual bool InitialPass(std::vector<std::string>& args);
+ virtual bool InitialPass(std::vector<std::string> const& args);
virtual void FinalPass();
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 30ebef3597..9926c25b84 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmProjectCommand.h"
// 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)
{
diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h
index e03e0821bd..dd6d8365f1 100644
--- a/Source/cmProjectCommand.h
+++ b/Source/cmProjectCommand.h
@@ -67,7 +67,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index 2357468a9a..657788083a 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSetCommand.h"
// cmSetCommand
-bool cmSetCommand::InitialPass(std::vector<std::string>& args)
+bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -90,7 +90,7 @@ bool cmSetCommand::InitialPass(std::vector<std::string>& args)
message += "Syntax error in SET:\n";
message += "CACHE requires TYPE and document string SET command:\n";
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)
{
message += *i;
diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h
index b1a4c7dcf0..81d390d3b8 100644
--- a/Source/cmSetCommand.h
+++ b/Source/cmSetCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index c629c4415c..42a4c3325f 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSiteNameCommand.h"
// cmSiteNameCommand
-bool cmSiteNameCommand::InitialPass(std::vector<std::string>& args)
+bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h
index b74c39dc6d..8eb8bcaa27 100644
--- a/Source/cmSiteNameCommand.h
+++ b/Source/cmSiteNameCommand.h
@@ -64,7 +64,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx
index 778c095ef6..6795b845e3 100644
--- a/Source/cmSourceFilesCommand.cxx
+++ b/Source/cmSourceFilesCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceFilesCommand.h"
// cmSourceFilesCommand
-bool cmSourceFilesCommand::InitialPass(std::vector<std::string>& args)
+bool cmSourceFilesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
std::string copy = *i;
diff --git a/Source/cmSourceFilesCommand.h b/Source/cmSourceFilesCommand.h
index 48ad84bc42..235c6b6ce3 100644
--- a/Source/cmSourceFilesCommand.h
+++ b/Source/cmSourceFilesCommand.h
@@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmSourceFilesRemoveCommand.cxx b/Source/cmSourceFilesRemoveCommand.cxx
index e43facb2ac..86efc2f414 100644
--- a/Source/cmSourceFilesRemoveCommand.cxx
+++ b/Source/cmSourceFilesRemoveCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceFilesRemoveCommand.h"
// cmSourceFilesRemoveCommand
-bool cmSourceFilesRemoveCommand::InitialPass(std::vector<std::string>& args)
+bool cmSourceFilesRemoveCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
cmSourceFile file;
diff --git a/Source/cmSourceFilesRemoveCommand.h b/Source/cmSourceFilesRemoveCommand.h
index 6de864f677..44cb63f8d3 100644
--- a/Source/cmSourceFilesRemoveCommand.h
+++ b/Source/cmSourceFilesRemoveCommand.h
@@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index f9e71db98e..627a5a4885 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSourceGroupCommand.h"
// cmSourceGroupCommand
-bool cmSourceGroupCommand::InitialPass(std::vector<std::string>& args)
+bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() != 2)
{
diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h
index 7f24460e47..cd4f1766fb 100644
--- a/Source/cmSourceGroupCommand.h
+++ b/Source/cmSourceGroupCommand.h
@@ -65,7 +65,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx
index c1720cd6f2..33a239ee8e 100644
--- a/Source/cmSubdirCommand.cxx
+++ b/Source/cmSubdirCommand.cxx
@@ -41,14 +41,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSubdirCommand.h"
// cmSubdirCommand
-bool cmSubdirCommand::InitialPass(std::vector<std::string>& args)
+bool cmSubdirCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
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)
{
m_Makefile->AddSubDirectory((*i).c_str());
diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h
index ef7f5e856e..15d03f75cd 100644
--- a/Source/cmSubdirCommand.h
+++ b/Source/cmSubdirCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmSubdirDependsCommand.cxx b/Source/cmSubdirDependsCommand.cxx
index 2060e1c12d..9d92da44df 100644
--- a/Source/cmSubdirDependsCommand.cxx
+++ b/Source/cmSubdirDependsCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSubdirDependsCommand.h"
// cmSubdirDependsCommand
-bool cmSubdirDependsCommand::InitialPass(std::vector<std::string>& args)
+bool cmSubdirDependsCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 2)
{
diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h
index 29c235e7fd..523a47bd4c 100644
--- a/Source/cmSubdirDependsCommand.h
+++ b/Source/cmSubdirDependsCommand.h
@@ -70,7 +70,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 526ee69035..013c5e4af7 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmTargetLinkLibrariesCommand.h"
// cmTargetLinkLibrariesCommand
-bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string>& args)
+bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
{
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
// 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)
{
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index faccd11e68..b16810e81a 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -66,7 +66,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx
index 2c70aa8ed0..96990cf198 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -42,16 +42,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h"
// cmUseMangledMesaCommand
-bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string>& args)
+bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& argsIn)
{
// expected two arguments:
// arguement one: the full path to gl_mangle.h
// arguement two : directory for output of edited headers
- if(args.size() < 2)
+ if(argsIn.size() < 2)
{
this->SetError("called with incorrect number of arguments");
return false;
}
+ std::vector<std::string> args = argsIn;
m_Makefile->ExpandVariablesInString(args[0]);
m_Makefile->ExpandVariablesInString(args[1]);
const char* inputDir = args[0].c_str();
diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h
index 6db3d2d72f..79bbdbcf45 100644
--- a/Source/cmUseMangledMesaCommand.h
+++ b/Source/cmUseMangledMesaCommand.h
@@ -25,7 +25,7 @@ public:
* This is called when the command is first encountered in
* 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.
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index ec996f9d19..250db2414f 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmUtilitySourceCommand.h"
// cmUtilitySourceCommand
-bool cmUtilitySourceCommand::InitialPass(std::vector<std::string>& args)
+bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 3)
{
diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h
index 32af3a911c..d24b3037ff 100644
--- a/Source/cmUtilitySourceCommand.h
+++ b/Source/cmUtilitySourceCommand.h
@@ -68,7 +68,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx
index 322c48602e..033cf0959f 100644
--- a/Source/cmVTKWrapJavaCommand.cxx
+++ b/Source/cmVTKWrapJavaCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmVTKWrapJavaCommand.h"
// cmVTKWrapJavaCommand
-bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string>& args)
+bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 3 )
{
@@ -65,7 +65,7 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string>& args)
// get the list of classes for this library
cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
- for(std::vector<std::string>::iterator j = (args.begin() + 2);
+ for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
j != args.end(); ++j)
{
cmMakefile::SourceMap::iterator l = Classes.find(*j);
diff --git a/Source/cmVTKWrapJavaCommand.h b/Source/cmVTKWrapJavaCommand.h
index 31bd2a5e16..3b72bd426c 100644
--- a/Source/cmVTKWrapJavaCommand.h
+++ b/Source/cmVTKWrapJavaCommand.h
@@ -24,7 +24,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx
index 1cfa21821c..09e8accacc 100644
--- a/Source/cmVTKWrapPythonCommand.cxx
+++ b/Source/cmVTKWrapPythonCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmVTKWrapPythonCommand.h"
// cmVTKWrapPythonCommand
-bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string>& args)
+bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 3 )
{
@@ -66,7 +66,7 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string>& args)
// get the list of classes for this library
cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
- for(std::vector<std::string>::iterator j = (args.begin() + 2);
+ for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
j != args.end(); ++j)
{
cmMakefile::SourceMap::iterator l = Classes.find(*j);
diff --git a/Source/cmVTKWrapPythonCommand.h b/Source/cmVTKWrapPythonCommand.h
index dcc713c067..be90456f9f 100644
--- a/Source/cmVTKWrapPythonCommand.h
+++ b/Source/cmVTKWrapPythonCommand.h
@@ -24,7 +24,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx
index 6fa52d0691..9dd4904d6d 100644
--- a/Source/cmVTKWrapTclCommand.cxx
+++ b/Source/cmVTKWrapTclCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmVTKWrapTclCommand.h"
// cmVTKWrapTclCommand
-bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string>& args)
+bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 3 )
{
@@ -63,7 +63,7 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string>& args)
std::vector<std::string> sources;
bool doing_sources = true;
- for(std::vector<std::string>::iterator j = (args.begin() + 1);
+ for(std::vector<std::string>::const_iterator j = (args.begin() + 1);
j != args.end(); ++j)
{
if(*j == "SOURCES")
diff --git a/Source/cmVTKWrapTclCommand.h b/Source/cmVTKWrapTclCommand.h
index 65f9774eea..65346303db 100644
--- a/Source/cmVTKWrapTclCommand.h
+++ b/Source/cmVTKWrapTclCommand.h
@@ -25,7 +25,7 @@ public:
* This is called when the command is first encountered in
* 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
diff --git a/Source/cmWrapExcludeFilesCommand.cxx b/Source/cmWrapExcludeFilesCommand.cxx
index eb64759536..6c47086dc5 100644
--- a/Source/cmWrapExcludeFilesCommand.cxx
+++ b/Source/cmWrapExcludeFilesCommand.cxx
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmWrapExcludeFilesCommand.h"
// cmWrapExcludeFilesCommand
-bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string>& args)
+bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -50,7 +50,7 @@ bool cmWrapExcludeFilesCommand::InitialPass(std::vector<std::string>& args)
}
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)
{
for(cmMakefile::SourceMap::iterator l = Classes.begin();
diff --git a/Source/cmWrapExcludeFilesCommand.h b/Source/cmWrapExcludeFilesCommand.h
index 967fcd91fd..75b7f9e157 100644
--- a/Source/cmWrapExcludeFilesCommand.h
+++ b/Source/cmWrapExcludeFilesCommand.h
@@ -56,7 +56,7 @@ public:
* This is called when the command is first encountered in
* 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.