better arg support
This commit is contained in:
parent
4e80d8e2b2
commit
ae2723878e
@ -87,23 +87,23 @@ void cmake::SetArgs(cmMakefile& builder, const std::vector<std::string>& args)
|
|||||||
for(unsigned int i=1; i < args.size(); ++i)
|
for(unsigned int i=1; i < args.size(); ++i)
|
||||||
{
|
{
|
||||||
std::string arg = args[i];
|
std::string arg = args[i];
|
||||||
if(arg.find("-H",0) != std::string::npos)
|
if(arg.find("-H",0) == 0)
|
||||||
{
|
{
|
||||||
std::string path = arg.substr(2);
|
std::string path = arg.substr(2);
|
||||||
builder.SetHomeDirectory(path.c_str());
|
builder.SetHomeDirectory(path.c_str());
|
||||||
}
|
}
|
||||||
if(arg.find("-S",0) != std::string::npos)
|
if(arg.find("-S",0) == 0)
|
||||||
{
|
{
|
||||||
m_Local = true;
|
m_Local = true;
|
||||||
std::string path = arg.substr(2);
|
std::string path = arg.substr(2);
|
||||||
builder.SetStartDirectory(path.c_str());
|
builder.SetStartDirectory(path.c_str());
|
||||||
}
|
}
|
||||||
if(arg.find("-O",0) != std::string::npos)
|
if(arg.find("-O",0) == 0)
|
||||||
{
|
{
|
||||||
std::string path = arg.substr(2);
|
std::string path = arg.substr(2);
|
||||||
builder.SetStartOutputDirectory(path.c_str());
|
builder.SetStartOutputDirectory(path.c_str());
|
||||||
}
|
}
|
||||||
if(arg.find("-B",0) != std::string::npos)
|
if(arg.find("-B",0) == 0)
|
||||||
{
|
{
|
||||||
std::string path = arg.substr(2);
|
std::string path = arg.substr(2);
|
||||||
builder.SetHomeOutputDirectory(path.c_str());
|
builder.SetHomeOutputDirectory(path.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user