command line fixes for win32
This commit is contained in:
parent
1a2a3abbfd
commit
768134c690
|
@ -734,7 +734,13 @@ std::string cmSystemTools::FindProgram(const char* name,
|
|||
{
|
||||
return cmSystemTools::CollapseFullPath(name);
|
||||
}
|
||||
|
||||
std::string tryPath = name;
|
||||
tryPath += cmSystemTools::GetExecutableExtension();
|
||||
if(cmSystemTools::FileExists(tryPath.c_str()))
|
||||
{
|
||||
return cmSystemTools::CollapseFullPath(tryPath.c_str());
|
||||
}
|
||||
|
||||
// Add the system search path to our path.
|
||||
std::vector<std::string> path = userPaths;
|
||||
cmSystemTools::GetPath(path);
|
||||
|
@ -742,7 +748,7 @@ std::string cmSystemTools::FindProgram(const char* name,
|
|||
for(std::vector<std::string>::const_iterator p = path.begin();
|
||||
p != path.end(); ++p)
|
||||
{
|
||||
std::string tryPath = *p;
|
||||
tryPath = *p;
|
||||
tryPath += "/";
|
||||
tryPath += name;
|
||||
if(cmSystemTools::FileExists(tryPath.c_str()))
|
||||
|
|
|
@ -84,12 +84,10 @@ void cmake::SetArgs(cmMakefile& builder, int ac, char** av)
|
|||
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||
if (ac == 2)
|
||||
{
|
||||
std::string hdir = cmSystemTools::GetCurrentWorkingDirectory()
|
||||
+ "/" + av[1];
|
||||
builder.SetHomeDirectory
|
||||
(cmSystemTools::CollapseFullPath(hdir.c_str()).c_str());
|
||||
(cmSystemTools::CollapseFullPath(av[1]).c_str());
|
||||
builder.SetStartDirectory
|
||||
(cmSystemTools::CollapseFullPath(hdir.c_str()).c_str());
|
||||
(cmSystemTools::CollapseFullPath(av[1]).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -146,7 +144,9 @@ void cmake::SetArgs(cmMakefile& builder, int ac, char** av)
|
|||
void cmake::AddCMakePaths(char **av)
|
||||
{
|
||||
// Find our own exectuable.
|
||||
std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
|
||||
std::string cMakeSelf = av[0];
|
||||
cmSystemTools::ConvertToUnixSlashes(cMakeSelf);
|
||||
cMakeSelf = cmSystemTools::FindProgram(cMakeSelf.c_str());
|
||||
|
||||
// Save the value in the cache
|
||||
cmCacheManager::GetInstance()->AddCacheEntry
|
||||
|
|
Loading…
Reference in New Issue