|
@@ -728,9 +728,6 @@ void cmake::SetArgs(const std::vector<std::string>& args,
|
|
|
this->SetHomeDirectory
|
|
this->SetHomeDirectory
|
|
|
(cmSystemTools::GetCurrentWorkingDirectory());
|
|
(cmSystemTools::GetCurrentWorkingDirectory());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- this->SetStartDirectory(this->GetHomeDirectory());
|
|
|
|
|
- this->SetStartOutputDirectory(this->GetHomeOutputDirectory());
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
@@ -801,9 +798,7 @@ void cmake::SetDirectoriesFromFile(const char* arg)
|
|
|
if (existingValue)
|
|
if (existingValue)
|
|
|
{
|
|
{
|
|
|
this->SetHomeOutputDirectory(cachePath);
|
|
this->SetHomeOutputDirectory(cachePath);
|
|
|
- this->SetStartOutputDirectory(cachePath);
|
|
|
|
|
this->SetHomeDirectory(existingValue);
|
|
this->SetHomeDirectory(existingValue);
|
|
|
- this->SetStartDirectory(existingValue);
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -813,14 +808,12 @@ void cmake::SetDirectoriesFromFile(const char* arg)
|
|
|
if(!listPath.empty())
|
|
if(!listPath.empty())
|
|
|
{
|
|
{
|
|
|
this->SetHomeDirectory(listPath);
|
|
this->SetHomeDirectory(listPath);
|
|
|
- this->SetStartDirectory(listPath);
|
|
|
|
|
|
|
|
|
|
if(argIsFile)
|
|
if(argIsFile)
|
|
|
{
|
|
{
|
|
|
// Source CMakeLists.txt file given. It was probably dropped
|
|
// Source CMakeLists.txt file given. It was probably dropped
|
|
|
// onto the executable in a GUI. Default to an in-source build.
|
|
// onto the executable in a GUI. Default to an in-source build.
|
|
|
this->SetHomeOutputDirectory(listPath);
|
|
this->SetHomeOutputDirectory(listPath);
|
|
|
- this->SetStartOutputDirectory(listPath);
|
|
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -828,7 +821,6 @@ void cmake::SetDirectoriesFromFile(const char* arg)
|
|
|
// directory as build tree.
|
|
// directory as build tree.
|
|
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
|
|
this->SetHomeOutputDirectory(cwd);
|
|
this->SetHomeOutputDirectory(cwd);
|
|
|
- this->SetStartOutputDirectory(cwd);
|
|
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -839,9 +831,7 @@ void cmake::SetDirectoriesFromFile(const char* arg)
|
|
|
std::string full = cmSystemTools::CollapseFullPath(arg);
|
|
std::string full = cmSystemTools::CollapseFullPath(arg);
|
|
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
|
|
this->SetHomeDirectory(full);
|
|
this->SetHomeDirectory(full);
|
|
|
- this->SetStartDirectory(full);
|
|
|
|
|
this->SetHomeOutputDirectory(cwd);
|
|
this->SetHomeOutputDirectory(cwd);
|
|
|
- this->SetStartOutputDirectory(cwd);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// at the end of this CMAKE_ROOT and CMAKE_COMMAND should be added to the
|
|
// at the end of this CMAKE_ROOT and CMAKE_COMMAND should be added to the
|
|
@@ -1006,28 +996,6 @@ const char* cmake::GetHomeOutputDirectory() const
|
|
|
return this->HomeOutputDirectory.c_str();
|
|
return this->HomeOutputDirectory.c_str();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const char* cmake::GetStartDirectory() const
|
|
|
|
|
-{
|
|
|
|
|
- return this->cmStartDirectory.c_str();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-void cmake::SetStartDirectory(const std::string& dir)
|
|
|
|
|
-{
|
|
|
|
|
- this->cmStartDirectory = dir;
|
|
|
|
|
- cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const char* cmake::GetStartOutputDirectory() const
|
|
|
|
|
-{
|
|
|
|
|
- return this->StartOutputDirectory.c_str();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-void cmake::SetStartOutputDirectory(const std::string& dir)
|
|
|
|
|
-{
|
|
|
|
|
- this->StartOutputDirectory = dir;
|
|
|
|
|
- cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
|
|
void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
|
|
|
{
|
|
{
|
|
|
if(!gg)
|
|
if(!gg)
|
|
@@ -1088,7 +1056,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
|
|
|
|
|
|
|
|
int cmake::DoPreConfigureChecks()
|
|
int cmake::DoPreConfigureChecks()
|
|
|
{
|
|
{
|
|
|
- // Make sure the Start directory contains a CMakeLists.txt file.
|
|
|
|
|
|
|
+ // Make sure the Source directory contains a CMakeLists.txt file.
|
|
|
std::string srcList = this->GetHomeDirectory();
|
|
std::string srcList = this->GetHomeDirectory();
|
|
|
srcList += "/CMakeLists.txt";
|
|
srcList += "/CMakeLists.txt";
|
|
|
if(!cmSystemTools::FileExists(srcList.c_str()))
|
|
if(!cmSystemTools::FileExists(srcList.c_str()))
|
|
@@ -1262,7 +1230,7 @@ int cmake::ActualConfigure()
|
|
|
this->CacheManager->AddCacheEntry
|
|
this->CacheManager->AddCacheEntry
|
|
|
("CMAKE_HOME_DIRECTORY",
|
|
("CMAKE_HOME_DIRECTORY",
|
|
|
this->GetHomeDirectory(),
|
|
this->GetHomeDirectory(),
|
|
|
- "Start directory with the top level CMakeLists.txt file for this "
|
|
|
|
|
|
|
+ "Source directory with the top level CMakeLists.txt file for this "
|
|
|
"project",
|
|
"project",
|
|
|
cmState::INTERNAL);
|
|
cmState::INTERNAL);
|
|
|
}
|
|
}
|
|
@@ -1632,12 +1600,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // If we are doing global generate, we better set start and start
|
|
|
|
|
- // output directory to the root of the project.
|
|
|
|
|
- std::string oldstartdir = this->GetStartDirectory();
|
|
|
|
|
- std::string oldstartoutputdir = this->GetStartOutputDirectory();
|
|
|
|
|
- this->SetStartDirectory(this->GetHomeDirectory());
|
|
|
|
|
- this->SetStartOutputDirectory(this->GetHomeOutputDirectory());
|
|
|
|
|
int ret = this->Configure();
|
|
int ret = this->Configure();
|
|
|
if (ret || this->GetWorkingMode() != NORMAL_MODE)
|
|
if (ret || this->GetWorkingMode() != NORMAL_MODE)
|
|
|
{
|
|
{
|
|
@@ -1667,8 +1629,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|
|
{
|
|
{
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
|
- this->SetStartDirectory(oldstartdir);
|
|
|
|
|
- this->SetStartOutputDirectory(oldstartoutputdir);
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|