summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-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 7b35fc6..2c481c3 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 6d0dafa..7d3f173 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 070c1af..18016f8 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 3acf4ce..2c293c4 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 19a0ad7..9afe7bb 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 e593ed4..ec28072 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 baa08e4..11dcc95 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 8eff6fe..5a60a21 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 83136a2..b1ce21f 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 421a32e..22ebc12 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 f75e909..cf3d68e 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 9ec8a82..7860419 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 e7d16b4..481be7e 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 6f0e272..4c9870e 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 1639ce0..89614a2 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 893681b..52aa210 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 528c365..18037b4 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 38be6fc..5043459 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 5016825..ca17210 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 f2dce71..4d9a6bb 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 ba22657..28ea366 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 7eab6a2..bfa5747 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 19112f5..8dd2ebe 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 24793c8..a1c801f 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 ee43675..b9cba5a 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 bf49a82..9f482d3 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 ab624b0..b052ffa 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 65f0d9f..bb4ac9d 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 7d71e0d..a50baa3 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 0f35203..12847cf 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 f4df774..71ac225 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 12688f3..e3f66d0 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 3bef15e..e8b6198 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 b34ba69..7c453d9 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 7972a1b..e070c93 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 287b2e0..d7361d9 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 f391b69..0b8c85d 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 321e808..9ee38dc 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 7a240fe..b610a21 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 3712937..d245fa7 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 1a931bb..5e374f2 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 51a6bce..cd275b2 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 7b0550c..c4abd46 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 d401d17..048fc75 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 1195ea8..e6c7edc 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 d23321e..060fb10 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 7803da2..03f6d72 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 ee029d2..e496ac9 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 9b20005..390cef8 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 5d825fe..19b8873 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 85a59db..703f9e3 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 5355bc0..9d8910f 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 3c2d35d..68eb6cc 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 c60fbef..854d833 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 22b82cf..d56fe5c 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 755df69..579e24a 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 2ccc556..b5c5861 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 fcec512..4cab776 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 b4cf57a..6516fdb 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 070f703..423727a 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 657691b..6b83558 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 307bfb9..082c75c 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 5e379c8..cb27b0a 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 03f48d1..067e6e5 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 793a254..e18d9d7 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 8fd859a..ab3b530 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 56455cb..ba1d5a8 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 39a8096..2e28dfa 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 1be241e..bd3bdc0 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 93afbd6..e1445a9 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 3a80af9..859cecd 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 22dd4af..aac1a11 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 6f07096..12f5dcf 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 d58f72d..f3e777e 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 797e364..451cdda 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 7671bd3..bb28eab 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 eb0ad36..67618fe 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 3e167de..92bd7d4 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 99baea5..76d6683 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 d796ad7..0c6e2a9 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 440acb1..e5da431 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 30ebef3..9926c25 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 e03e082..dd6d836 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 2357468..6577880 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 b1a4c7d..81d390d 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 c629c44..42a4c33 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 b74c39d..8eb8bca 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 778c095..6795b84 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 48ad84b..235c6b6 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 e43facb..86efc2f 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 6de864f..44cb63f 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 f9e71db..627a5a4 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 7f24460..cd4f176 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 c1720cd..33a239e 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 ef7f5e8..15d03f7 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 2060e1c..9d92da4 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 29c235e..523a47b 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 526ee69..013c5e4 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 faccd11..b16810e 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 2c70aa8..96990cf 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 6db3d2d..79bbdbc 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 ec996f9..250db24 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 32af3a9..d24b303 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 322c486..033cf09 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 31bd2a5..3b72bd4 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 1cfa218..09e8acc 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 dcc713c..be90456 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 6fa52d0..9dd4904 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 65f9774..6534630 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 eb64759..6c47086 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 967fcd9..75b7f9e 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.