ENH: change InitialPass to take a const reference to the argument string, to avoid changes to the file cache
This commit is contained in:
parent
b9d56e8497
commit
baa28efd10
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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")
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue