cmake-gui: Suppress incidental error messages while choosing build tree

Avoid printing

    Error: <path> is not a directory

to the console for every update to the GUI's build directory widget.
This commit is contained in:
Brad King 2025-03-06 10:58:12 -05:00
parent 6f0ad398f1
commit d1792c48d5

View File

@ -4016,7 +4016,9 @@ bool cmake::Open(std::string const& dir, DryRun dryRun)
this->SetHomeDirectory("");
this->SetHomeOutputDirectory("");
if (!cmSystemTools::FileIsDirectory(dir)) {
if (dryRun == DryRun::No) {
std::cerr << "Error: " << dir << " is not a directory\n";
}
return false;
}