BUG: the -P option was not working with relative paths and a couple types
This commit is contained in:
parent
244f5ec26a
commit
9be341383e
|
@ -283,7 +283,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
|
||||||
std::string path = args[i];
|
std::string path = args[i];
|
||||||
if ( path.size() == 0 )
|
if ( path.size() == 0 )
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("No cmake scrpt provided.");
|
cmSystemTools::Error("No cmake script provided.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::cerr << "Running cmake script file " << path.c_str() << "\n";
|
std::cerr << "Running cmake script file " << path.c_str() << "\n";
|
||||||
|
@ -312,10 +312,17 @@ void cmake::ReadListFile(const char *path)
|
||||||
{
|
{
|
||||||
std::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
|
std::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
|
||||||
lg->SetGlobalGenerator(gg);
|
lg->SetGlobalGenerator(gg);
|
||||||
|
lg->GetMakefile()->SetHomeOutputDirectory
|
||||||
|
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||||
|
lg->GetMakefile()->SetStartOutputDirectory
|
||||||
|
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||||
|
lg->GetMakefile()->SetHomeDirectory
|
||||||
|
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||||
|
lg->GetMakefile()->SetStartDirectory
|
||||||
|
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||||
if (!lg->GetMakefile()->ReadListFile(0, path))
|
if (!lg->GetMakefile()->ReadListFile(0, path))
|
||||||
{
|
{
|
||||||
std::cerr << "Error in reading cmake initial cache file:"
|
std::cerr << "Error processing file:" << path << "\n";
|
||||||
<< path << "\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue