cmake-gui: Clarify "Open Project" button implementation details
This commit is contained in:
parent
7c55e2a698
commit
6f0ad398f1
@ -310,8 +310,8 @@ void QCMake::open()
|
||||
InterruptFlag = 0;
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
auto successful =
|
||||
this->CMakeInstance->Open(this->BinaryDirectory.toStdString(), false);
|
||||
auto successful = this->CMakeInstance->Open(
|
||||
this->BinaryDirectory.toStdString(), cmake::DryRun::No);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
SetErrorMode(lastErrorMode);
|
||||
@ -715,6 +715,6 @@ void QCMake::setWarnUninitializedMode(bool value)
|
||||
void QCMake::checkOpenPossible()
|
||||
{
|
||||
std::string data = this->BinaryDirectory.toStdString();
|
||||
auto possible = this->CMakeInstance->Open(data, true);
|
||||
auto possible = this->CMakeInstance->Open(data, cmake::DryRun::Yes);
|
||||
emit openPossible(possible);
|
||||
}
|
||||
|
@ -4011,7 +4011,7 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
|
||||
return buildresult;
|
||||
}
|
||||
|
||||
bool cmake::Open(std::string const& dir, bool dryRun)
|
||||
bool cmake::Open(std::string const& dir, DryRun dryRun)
|
||||
{
|
||||
this->SetHomeDirectory("");
|
||||
this->SetHomeOutputDirectory("");
|
||||
@ -4052,7 +4052,7 @@ bool cmake::Open(std::string const& dir, bool dryRun)
|
||||
return false;
|
||||
}
|
||||
|
||||
return gen->Open(dir, *cachedProjectName, dryRun);
|
||||
return gen->Open(dir, *cachedProjectName, dryRun == DryRun::Yes);
|
||||
}
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
|
@ -643,8 +643,14 @@ public:
|
||||
std::string const& presetName, bool listPresets,
|
||||
std::vector<std::string> const& args);
|
||||
|
||||
enum class DryRun
|
||||
{
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
//! run the --open option
|
||||
bool Open(std::string const& dir, bool dryRun);
|
||||
bool Open(std::string const& dir, DryRun dryRun);
|
||||
|
||||
//! run the --workflow option
|
||||
enum class WorkflowListPresets
|
||||
|
@ -1132,7 +1132,7 @@ int do_open(int ac, char const* const* av)
|
||||
cm.SetProgressCallback([&cm](std::string const& msg, float prog) {
|
||||
cmakemainProgressCallback(msg, prog, &cm);
|
||||
});
|
||||
return cm.Open(dir, false) ? 0 : 1;
|
||||
return cm.Open(dir, cmake::DryRun::No) ? 0 : 1;
|
||||
#endif
|
||||
}
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user