mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
This commit is contained in:
1 parent
7116712771
commit
98a10290a8
56 files changed
+212
-212
No files matched your search
@@ -151,7 +151,7 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
|
||||
|
||||
int cmCPackWIXGenerator::PackageFiles()
|
||||
{
|
||||
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Fatal WiX Generator Error" << std::endl);
|
||||
return false;
|
||||
|
||||
@@ -73,7 +73,7 @@ int cmCPackExternalGenerator::PackageFiles()
|
||||
|
||||
bool res = this->MakefileMap->ReadListFile(packageScript);
|
||||
|
||||
if (cmSystemTools::GetErrorOccuredFlag() || !res) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag() || !res) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ void cmCPackFreeBSDGenerator::write_manifest_fields(
|
||||
cmExpandedList(var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE"));
|
||||
std::string licenselogic("single");
|
||||
if (licenses.empty()) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
} else if (licenses.size() > 1) {
|
||||
licenselogic = var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC");
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||
this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR",
|
||||
tempInstallDirectory);
|
||||
bool res = this->MakefileMap->ReadListFile(installScript);
|
||||
if (cmSystemTools::GetErrorOccuredFlag() || !res) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag() || !res) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -973,7 +973,7 @@ int cmCPackGenerator::InstallCMakeProject(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cmSystemTools::GetErrorOccuredFlag() || !res) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag() || !res) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -985,7 +985,7 @@ bool cmCPackGenerator::ReadListFile(const char* moduleName)
|
||||
std::string fullPath = this->MakefileMap->GetModulesFile(moduleName);
|
||||
retval = this->MakefileMap->ReadListFile(fullPath);
|
||||
// include FATAL_ERROR and ERROR in the return status
|
||||
retval = retval && (!cmSystemTools::GetErrorOccuredFlag());
|
||||
retval = retval && (!cmSystemTools::GetErrorOccurredFlag());
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ int cmCPackGenerator::DoPackage()
|
||||
this->MakefileMap->SetPolicyVersion(cmVersion::GetCMakeVersion(),
|
||||
std::string());
|
||||
|
||||
if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!this->PackageFiles() || cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem compressing the directory" << std::endl);
|
||||
return 0;
|
||||
@@ -1214,7 +1214,7 @@ int cmCPackGenerator::Initialize(const std::string& name, cmMakefile* mf)
|
||||
mf->ReadListFile(config);
|
||||
}
|
||||
int result = this->InitializeInternal();
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,6 @@ void cmCPackLog::Log(int tag, const char* file, int line, const char* msg,
|
||||
}
|
||||
|
||||
if (error) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
}
|
||||
}
|
||||
@@ -473,7 +473,7 @@ int main(int argc, char const* const* argv)
|
||||
return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1;
|
||||
}
|
||||
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ int cmCTestBuildAndTestHandler::ProcessHandler()
|
||||
{
|
||||
this->Output.clear();
|
||||
std::string output;
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
int retv = this->RunCMakeAndTest(&this->Output);
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
return retv;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
||||
std::string e = cmStrCat("could not create generator named \"",
|
||||
*cmakeGeneratorName, '"');
|
||||
this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
|
||||
"maybe you forgot to call ctest_start() before calling "
|
||||
"ctest_configure()."
|
||||
<< std::endl);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(),
|
||||
|
||||
@@ -29,8 +29,8 @@ class SaveRestoreErrorState
|
||||
public:
|
||||
SaveRestoreErrorState()
|
||||
{
|
||||
this->InitialErrorState = cmSystemTools::GetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccuredFlag(); // rest the error state
|
||||
this->InitialErrorState = cmSystemTools::GetErrorOccurredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag(); // rest the error state
|
||||
this->CaptureCMakeErrorValue = false;
|
||||
}
|
||||
// if the function has a CAPTURE_CMAKE_ERROR then we should restore
|
||||
@@ -44,21 +44,21 @@ public:
|
||||
// otherwise leave it be what it is
|
||||
if (!this->CaptureCMakeErrorValue) {
|
||||
if (this->InitialErrorState) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
}
|
||||
return;
|
||||
}
|
||||
// if we have saved the error in a return variable
|
||||
// then put things back exactly like they were
|
||||
bool currentState = cmSystemTools::GetErrorOccuredFlag();
|
||||
bool currentState = cmSystemTools::GetErrorOccurredFlag();
|
||||
// if the state changed during this command we need
|
||||
// to handle it, if not then nothing needs to be done
|
||||
if (currentState != this->InitialErrorState) {
|
||||
// restore the initial error state
|
||||
if (this->InitialErrorState) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
} else {
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
||||
// log the error message if there was an error
|
||||
if (captureCMakeError) {
|
||||
const char* returnString = "0";
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
returnString = "-1";
|
||||
std::string const& err = status.GetError();
|
||||
// print out the error if it is not "unknown error" which means
|
||||
|
||||
@@ -277,7 +277,7 @@ void cmCTestScriptHandler::CreateCMake()
|
||||
int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
||||
{
|
||||
// Reset the error flag so that the script is read in no matter what
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
// if the argument has a , in it then it needs to be broken into the fist
|
||||
// argument (which is the script) and the second argument which will be
|
||||
@@ -341,7 +341,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
||||
std::string systemFile =
|
||||
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
|
||||
if (!this->Makefile->ReadListFile(systemFile) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error in read:" << systemFile << "\n");
|
||||
return 2;
|
||||
@@ -356,10 +356,10 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
||||
|
||||
// finally read in the script
|
||||
if (!this->Makefile->ReadListFile(script) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// Reset the error flag so that it can run more than
|
||||
// one script with an error when you use ctest_run_script.
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -1818,7 +1818,7 @@ bool cmCTestTestHandler::GetListOfTests()
|
||||
if (!mf.ReadListFile(testFilename)) {
|
||||
return false;
|
||||
}
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// SEND_ERROR or FATAL_ERROR in CTestTestfile or TEST_INCLUDE_FILES
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -494,21 +494,21 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||
|
||||
if (retVal != 0 || this->HasNonStatusOutputs) {
|
||||
// see if there was an error
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
this->OkToGenerate = false;
|
||||
}
|
||||
int xx;
|
||||
int yy;
|
||||
getmaxyx(stdscr, yy, xx);
|
||||
const char* title = "Configure produced the following output";
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
title = "Configure failed with the following output";
|
||||
}
|
||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
|
||||
this->Outputs, title,
|
||||
cmCursesLongMessageForm::ScrollBehavior::ScrollDown);
|
||||
// reset error condition
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
CurrentForm = msgs;
|
||||
msgs->Render(1, 1, xx, yy);
|
||||
msgs->HandleInput();
|
||||
@@ -547,16 +547,16 @@ int cmCursesMainForm::Generate()
|
||||
|
||||
if (retVal != 0 || this->HasNonStatusOutputs) {
|
||||
// see if there was an error
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
this->OkToGenerate = false;
|
||||
}
|
||||
// reset error condition
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
int xx;
|
||||
int yy;
|
||||
getmaxyx(stdscr, yy, xx);
|
||||
const char* title = "Generate produced the following output";
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
title = "Generate failed with the following output";
|
||||
}
|
||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
|
||||
|
||||
@@ -252,7 +252,7 @@ void QCMake::configure()
|
||||
this->CMakeInstance->PreLoadCMakeFiles();
|
||||
|
||||
InterruptFlag = 0;
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
err = this->CMakeInstance->Configure();
|
||||
|
||||
@@ -277,7 +277,7 @@ void QCMake::generate()
|
||||
#endif
|
||||
|
||||
InterruptFlag = 0;
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
err = this->CMakeInstance->Generate();
|
||||
|
||||
@@ -297,7 +297,7 @@ void QCMake::open()
|
||||
#endif
|
||||
|
||||
InterruptFlag = 0;
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
auto successful =
|
||||
this->CMakeInstance->Open(this->BinaryDirectory.toStdString(), false);
|
||||
|
||||
@@ -338,7 +338,7 @@ std::map<std::string, std::string> GetOSReleaseVariables(
|
||||
|
||||
// include FATAL_ERROR and ERROR in the return status
|
||||
if (!makefile.ReadListFile(script) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// Ok, no worries... go try the next script.
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace {
|
||||
bool FatalError(cmExecutionStatus& status, std::string const& error)
|
||||
{
|
||||
status.SetError(error);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ bool cmCMakeMinimumRequired(std::vector<std::string> const& args,
|
||||
<< " or higher is required. You are running version "
|
||||
<< cmVersion::GetCMakeVersion();
|
||||
status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -1391,7 +1391,7 @@ void cmCTest::StartXML(cmXMLWriter& xml, bool append)
|
||||
"Current Tag empty, this may mean"
|
||||
" NightlStartTime was not set correctly."
|
||||
<< std::endl);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
// find out about the system
|
||||
@@ -3022,17 +3022,17 @@ int cmCTest::ReadCustomConfigurationFileTree(const std::string& dir,
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration file: " << fname
|
||||
<< std::endl);
|
||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
bool erroroc = cmSystemTools::GetErrorOccurredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
|
||||
if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading custom configuration: " << fname
|
||||
<< std::endl);
|
||||
}
|
||||
found = true;
|
||||
if (erroroc) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3047,7 +3047,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const std::string& dir,
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration file: " << file
|
||||
<< std::endl);
|
||||
if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading custom configuration: " << file
|
||||
<< std::endl);
|
||||
@@ -3661,7 +3661,7 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg,
|
||||
cmCTestLogOutputFileLine(err);
|
||||
err << msg;
|
||||
err.flush();
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
break;
|
||||
default:
|
||||
cmCTestLogOutputFileLine(out);
|
||||
|
||||
@@ -53,7 +53,7 @@ bool cmConfigureFileCommand(std::vector<std::string> const& args,
|
||||
std::string e = "attempted to configure a file: " + outputFile +
|
||||
" into a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
std::string errorMessage;
|
||||
|
||||
@@ -16,7 +16,7 @@ bool cmContinueCommand(std::vector<std::string> const& args,
|
||||
MessageType::FATAL_ERROR,
|
||||
"A CONTINUE command was found outside of a "
|
||||
"proper FOREACH or WHILE loop scope.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ bool cmContinueCommand(std::vector<std::string> const& args,
|
||||
MessageType::FATAL_ERROR,
|
||||
"The CONTINUE command does not accept any "
|
||||
"arguments.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -974,8 +974,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
}
|
||||
}
|
||||
|
||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
bool erroroc = cmSystemTools::GetErrorOccurredFlag();
|
||||
cmSystemTools::ResetErrorOccurredFlag();
|
||||
std::string output;
|
||||
// actually do the try compile now that everything is setup
|
||||
int res = this->Makefile->TryCompile(
|
||||
@@ -983,7 +983,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
this->SrcFileSignature, cmake::NO_BUILD_PARALLEL_LEVEL, &cmakeFlags,
|
||||
output);
|
||||
if (erroroc) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
}
|
||||
|
||||
// set the result var to the return value to indicate success or failure
|
||||
|
||||
@@ -113,7 +113,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
||||
if (!status.GetMakefile().CanIWriteThisFile(arguments.OutputFile)) {
|
||||
status.SetError("attempted to output into a file: " +
|
||||
arguments.OutputFile + " into a source directory.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +470,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
||||
break;
|
||||
}
|
||||
if (!ret) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+39
-39
@@ -87,7 +87,7 @@ bool HandleWriteImpl(std::vector<std::string> const& args, bool append,
|
||||
std::string e =
|
||||
"attempted to write a file: " + fileName + " into a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
std::string dir = cmSystemTools::GetFilenamePath(fileName);
|
||||
@@ -835,7 +835,7 @@ bool HandleMakeDirectoryCommand(std::vector<std::string> const& args,
|
||||
std::string e = "attempted to create a directory: " + *cdir +
|
||||
" into a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
if (!cmSystemTools::MakeDirectory(*cdir)) {
|
||||
@@ -865,7 +865,7 @@ bool HandleTouchImpl(std::vector<std::string> const& args, bool create,
|
||||
std::string e =
|
||||
"attempted to touch a file: " + tfile + " in a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
if (!cmSystemTools::Touch(tfile, create)) {
|
||||
@@ -2762,7 +2762,7 @@ bool HandleLockCommand(std::vector<std::string> const& args,
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat("directory\n \"", parentDir,
|
||||
"\"\ncreation failed (check permissions)."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
FILE* file = cmsys::SystemTools::Fopen(path, "w");
|
||||
@@ -2771,7 +2771,7 @@ bool HandleLockCommand(std::vector<std::string> const& args,
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat("file\n \"", path,
|
||||
"\"\ncreation failed (check permissions)."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
fclose(file);
|
||||
@@ -2795,7 +2795,7 @@ bool HandleLockCommand(std::vector<std::string> const& args,
|
||||
fileLockResult = lockPool.LockProcessScope(path, timeout);
|
||||
break;
|
||||
default:
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2806,7 +2806,7 @@ bool HandleLockCommand(std::vector<std::string> const& args,
|
||||
status.GetMakefile().IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat("error locking file\n \"", path, "\"\n", result, "."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3041,7 +3041,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
status.SetError(
|
||||
cmStrCat("GET_RUNTIME_DEPENDENCIES is not supported on system \"",
|
||||
platform, "\""));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3109,7 +3109,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
auto argIt = unrecognizedArguments.begin();
|
||||
if (argIt != unrecognizedArguments.end()) {
|
||||
status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\""));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3131,7 +3131,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
if (kwend != kwbegin) {
|
||||
status.SetError(cmStrCat("Keywords missing values:\n ",
|
||||
cmJoin(cmMakeRange(kwbegin, kwend), "\n ")));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3143,13 +3143,13 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
std::move(parsedArgs.PostExcludeFiles),
|
||||
std::move(parsedArgs.PostExcludeFilesStrict));
|
||||
if (!archive.Prepare()) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!archive.GetRuntimeDependencies(
|
||||
parsedArgs.Executables, parsedArgs.Libraries, parsedArgs.Modules)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3190,7 +3190,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
e << "\n " << path;
|
||||
}
|
||||
status.SetError(e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3206,7 +3206,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
e << "\n " << path;
|
||||
}
|
||||
status.SetError(e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3260,7 +3260,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args,
|
||||
if (argIt != unrecognizedArguments.end()) {
|
||||
status.SetError(
|
||||
cmStrCat("CONFIGURE Unrecognized argument: \"", *argIt, "\""));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3272,7 +3272,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args,
|
||||
e) != keywordsMissingArguments.end();
|
||||
if (optionHasNoValue) {
|
||||
status.SetError(cmStrCat("CONFIGURE ", e, " option needs a value."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3283,7 +3283,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args,
|
||||
parsedKeywords.end();
|
||||
if (!optionGiven) {
|
||||
status.SetError(cmStrCat("CONFIGURE ", e, " option is mandatory."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3398,7 +3398,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
auto argIt = unrecognizedArguments.begin();
|
||||
if (argIt != unrecognizedArguments.end()) {
|
||||
status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\""));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3410,7 +3410,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
if (kwend != kwbegin) {
|
||||
status.SetError(cmStrCat("Keywords missing values:\n ",
|
||||
cmJoin(cmMakeRange(kwbegin, kwend), "\n ")));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3422,7 +3422,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
!cm::contains(knownFormats, parsedArgs.Format)) {
|
||||
status.SetError(
|
||||
cmStrCat("archive format ", parsedArgs.Format, " not supported"));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3431,7 +3431,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
cm::contains(zipFileFormats, parsedArgs.Format)) {
|
||||
status.SetError(cmStrCat("archive format ", parsedArgs.Format,
|
||||
" does not support COMPRESSION arguments"));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3449,7 +3449,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
} else if (!parsedArgs.Compression.empty()) {
|
||||
status.SetError(cmStrCat("compression type ", parsedArgs.Compression,
|
||||
" is not supported"));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3460,7 +3460,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
status.SetError(cmStrCat("compression level ",
|
||||
parsedArgs.CompressionLevel,
|
||||
" should be in range 0 to 9"));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
compressionLevel = std::stoi(parsedArgs.CompressionLevel);
|
||||
@@ -3468,21 +3468,21 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
status.SetError(cmStrCat("compression level ",
|
||||
parsedArgs.CompressionLevel,
|
||||
" should be in range 0 to 9"));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
if (compress == cmSystemTools::TarCompressNone) {
|
||||
status.SetError(cmStrCat("compression level is not supported for "
|
||||
"compression \"None\"",
|
||||
parsedArgs.Compression));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (parsedArgs.Paths.empty()) {
|
||||
status.SetError("ARCHIVE_CREATE requires a non-empty list of PATHS");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3490,7 +3490,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args,
|
||||
parsedArgs.Verbose, parsedArgs.MTime,
|
||||
parsedArgs.Format, compressionLevel)) {
|
||||
status.SetError(cmStrCat("failed to compress: ", parsedArgs.Output));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3526,7 +3526,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
auto argIt = unrecognizedArguments.begin();
|
||||
if (argIt != unrecognizedArguments.end()) {
|
||||
status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\""));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3537,7 +3537,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
if (kwend != kwbegin) {
|
||||
status.SetError(cmStrCat("Keywords missing values:\n ",
|
||||
cmJoin(cmMakeRange(kwbegin, kwend), "\n ")));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3547,7 +3547,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
if (!cmSystemTools::ListTar(inFile, parsedArgs.Patterns,
|
||||
parsedArgs.Verbose)) {
|
||||
status.SetError(cmStrCat("failed to list: ", inFile));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@@ -3561,7 +3561,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
|
||||
if (!cmSystemTools::MakeDirectory(destDir)) {
|
||||
status.SetError(cmStrCat("failed to create directory: ", destDir));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3575,7 +3575,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
if (workdir.Failed()) {
|
||||
status.SetError(
|
||||
cmStrCat("failed to change working directory to: ", destDir));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3585,7 +3585,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args,
|
||||
: cmSystemTools::cmTarExtractTimestamps::Yes,
|
||||
parsedArgs.Verbose)) {
|
||||
status.SetError(cmStrCat("failed to extract: ", inFile));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3599,7 +3599,7 @@ bool ValidateAndConvertPermissions(const std::vector<std::string>& permissions,
|
||||
for (const auto& i : permissions) {
|
||||
if (!cmFSPermissions::stringToModeT(i, perms)) {
|
||||
status.SetError(i + " is an invalid permission specifier");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3611,7 +3611,7 @@ bool SetPermissions(const std::string& filename, const mode_t& perms,
|
||||
{
|
||||
if (!cmSystemTools::SetPermissions(filename, perms)) {
|
||||
status.SetError("Failed to set permissions for " + filename);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3651,7 +3651,7 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse,
|
||||
parsedArgs.DirectoryPermissions.empty()) // no permissions given
|
||||
{
|
||||
status.SetError("No permissions given");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3660,14 +3660,14 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse,
|
||||
{
|
||||
status.SetError("Remove either PERMISSIONS or FILE_PERMISSIONS or "
|
||||
"DIRECTORY_PERMISSIONS from the invocation");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!keywordsMissingValues.empty()) {
|
||||
for (const auto& i : keywordsMissingValues) {
|
||||
status.SetError(i + " is not given any arguments");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3706,7 +3706,7 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse,
|
||||
for (const auto& i : allPathEntries) {
|
||||
if (!(cmSystemTools::FileExists(i) || cmSystemTools::FileIsDirectory(i))) {
|
||||
status.SetError(cmStrCat("does not exist:\n ", i));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@ void cmFindBase::StoreFindResult(const std::string& value)
|
||||
? "files"
|
||||
: "names"),
|
||||
": ", cmJoin(this->Names, ", ")));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1197,7 +1197,7 @@ bool cmFindPackageCommand::HandlePackageMode(
|
||||
: MessageType::WARNING,
|
||||
e.str());
|
||||
if (this->Required) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
if (!aw.str().empty()) {
|
||||
|
||||
@@ -271,7 +271,7 @@ auto cmForEachFunctionBlocker::invoke(
|
||||
if (status.GetContinueInvoked()) {
|
||||
break;
|
||||
}
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
result.Restore = false;
|
||||
result.Break = true;
|
||||
break;
|
||||
@@ -382,13 +382,13 @@ bool TryParseInteger(cmExecutionStatus& status, const std::string& str, int& i)
|
||||
std::ostringstream e;
|
||||
e << "Invalid integer: '" << str << "'";
|
||||
status.SetError(e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
} catch (std::out_of_range&) {
|
||||
std::ostringstream e;
|
||||
e << "Integer out of range: '" << str << "'";
|
||||
status.SetError(e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ bool cmForEachCommand(std::vector<std::string> const& args,
|
||||
status.SetError(
|
||||
cmStrCat("called with incorrect range specification: start ", start,
|
||||
", stop ", stop, ", step ", step));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg)
|
||||
for (std::string const& li : allConfigs) {
|
||||
this->Generate(lg, li, le, inputExpression.get(), outputFiles,
|
||||
this->Permissions);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ cmValue cmGeneratorTarget::GetProperty(const std::string& prop) const
|
||||
cmTargetPropertyComputer::GetProperty(this, prop, *this->Makefile)) {
|
||||
return result;
|
||||
}
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return nullptr;
|
||||
}
|
||||
return this->Target->GetProperty(prop);
|
||||
@@ -5698,7 +5698,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
|
||||
if (emitted.insert(p).second) {
|
||||
getLinkInterfaceDependentProperty<PropertyType>(depender, p, config, t,
|
||||
nullptr);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -5777,25 +5777,25 @@ void cmGeneratorTarget::CheckPropertyCompatibility(
|
||||
|
||||
checkPropertyConsistency<bool>(this, dep.Target, strBool, emittedBools,
|
||||
config, BoolType, nullptr);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
checkPropertyConsistency<const char*>(this, dep.Target, strString,
|
||||
emittedStrings, config, StringType,
|
||||
nullptr);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
checkPropertyConsistency<const char*>(this, dep.Target, strNumMin,
|
||||
emittedMinNumbers, config,
|
||||
NumberMinType, nullptr);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
checkPropertyConsistency<const char*>(this, dep.Target, strNumMax,
|
||||
emittedMaxNumbers, config,
|
||||
NumberMaxType, nullptr);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args,
|
||||
{
|
||||
if (args.size() < 3) {
|
||||
status.SetError("called with incorrect number of arguments");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args,
|
||||
} else {
|
||||
std::string err = "unknown component " + args[2];
|
||||
status.SetError(err);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
<< this->GetName() << "\". CMAKE_MAKE_PROGRAM is not set. You "
|
||||
<< "probably need to select a different build tool.";
|
||||
cmSystemTools::Error(err.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||
@@ -531,7 +531,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
|
||||
if (languages.empty()) {
|
||||
cmSystemTools::Error("EnableLanguage must have a lang specified!");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
<< "' is currently being enabled. "
|
||||
"Recursive call not allowed.";
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -560,7 +560,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
<< " which is not enabled.";
|
||||
this->TryCompileOuterMakefile->IssueMessage(MessageType::FATAL_ERROR,
|
||||
e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -659,28 +659,28 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
// Tell the generator about the instance, if any.
|
||||
std::string instance = mf->GetSafeDefinition("CMAKE_GENERATOR_INSTANCE");
|
||||
if (!this->SetGeneratorInstance(instance, mf)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
|
||||
// Tell the generator about the target system.
|
||||
std::string system = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
||||
if (!this->SetSystemName(system, mf)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
|
||||
// Tell the generator about the platform, if any.
|
||||
std::string platform = mf->GetSafeDefinition("CMAKE_GENERATOR_PLATFORM");
|
||||
if (!this->SetGeneratorPlatform(platform, mf)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
|
||||
// Tell the generator about the toolset, if any.
|
||||
std::string toolset = mf->GetSafeDefinition("CMAKE_GENERATOR_TOOLSET");
|
||||
if (!this->SetGeneratorToolset(toolset, false, mf)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -785,7 +785,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
cmSystemTools::Error("Could not find cmake module file: " +
|
||||
determineCompiler);
|
||||
}
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return;
|
||||
}
|
||||
needTestLanguage[lang] = true;
|
||||
@@ -954,7 +954,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
}
|
||||
|
||||
if (fatalError) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
for (std::string const& lang : cur_languages) {
|
||||
@@ -1374,7 +1374,7 @@ void cmGlobalGenerator::Configure()
|
||||
|
||||
if (this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE) {
|
||||
std::ostringstream msg;
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
msg << "Configuring incomplete, errors occurred!";
|
||||
const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr };
|
||||
for (const char** log = logs; *log; ++log) {
|
||||
@@ -1645,7 +1645,7 @@ void cmGlobalGenerator::Generate()
|
||||
|
||||
for (auto& buildExpSet : this->BuildExportSets) {
|
||||
if (!buildExpSet.second->GenerateImportFile()) {
|
||||
if (!cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!cmSystemTools::GetErrorOccurredFlag()) {
|
||||
this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"Could not write export file.");
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ bool cmGlobalNMakeMakefileGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
"'\n"
|
||||
"failed with:\n ",
|
||||
err));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
cmsys::RegularExpression regex(
|
||||
|
||||
@@ -604,7 +604,7 @@ void cmGlobalNinjaGenerator::Generate()
|
||||
this->WriteUnknownExplicitDependencies(*this->GetCommonFileStream());
|
||||
this->WriteBuiltinTargets(*this->GetCommonFileStream());
|
||||
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
this->RulesFileStream->setstate(std::ios::failbit);
|
||||
for (auto const& config : this->Makefiles[0]->GetGeneratorConfigs(
|
||||
cmMakefile::IncludeEmptyConfig)) {
|
||||
@@ -651,7 +651,7 @@ void cmGlobalNinjaGenerator::CleanMetaData()
|
||||
"'\n"
|
||||
"failed with:\n ",
|
||||
error));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -710,7 +710,7 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
"'\n"
|
||||
"failed with:\n ",
|
||||
error));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
this->NinjaVersion = cmTrimWhitespace(version);
|
||||
@@ -790,7 +790,7 @@ void cmGlobalNinjaGenerator::CheckNinjaCodePage()
|
||||
"'\n"
|
||||
"failed with:\n ",
|
||||
error));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
} else if (result == 0) {
|
||||
std::istringstream outputStream(output);
|
||||
std::string line;
|
||||
@@ -837,7 +837,7 @@ bool cmGlobalNinjaGenerator::CheckLanguages(
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"multiple values for CMAKE_OSX_ARCHITECTURES not "
|
||||
"supported with Swift");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -870,7 +870,7 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport()
|
||||
;
|
||||
/* clang-format on */
|
||||
this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -891,7 +891,7 @@ bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const
|
||||
;
|
||||
/* clang-format on */
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -912,7 +912,7 @@ bool cmGlobalNinjaGenerator::CheckISPC(cmMakefile* mf) const
|
||||
;
|
||||
/* clang-format on */
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
|
||||
"that is not an absolute path to an existing directory.";
|
||||
/* clang-format on */
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -955,7 +955,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
|
||||
if (!cmSystemTools::MakeDirectory(wd)) {
|
||||
std::string e = "Failed to make directory:\n " + wd;
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1086,7 +1086,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
|
||||
e << "Exit code: " << ret << "\n";
|
||||
}
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
this->VCTargetsPath = regex.match(1);
|
||||
@@ -1327,7 +1327,7 @@ bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf)
|
||||
<< " http://msdn.microsoft.com/en-us/windows/bb980924.aspx";
|
||||
/* clang-format on */
|
||||
mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ void cmGlobalVisualStudio7Generator::Generate()
|
||||
this->OutputSLNFile();
|
||||
// If any solution or project files changed during the generation,
|
||||
// tell Visual Studio to reload them...
|
||||
if (!cmSystemTools::GetErrorOccuredFlag() &&
|
||||
if (!cmSystemTools::GetErrorOccurredFlag() &&
|
||||
!this->LocalGenerators.empty()) {
|
||||
this->CallVisualStudioMacro(MacroReload,
|
||||
GetSLNFile(this->LocalGenerators[0].get()));
|
||||
|
||||
@@ -885,7 +885,7 @@ cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommandEarly(cmMakefile* mf)
|
||||
{
|
||||
std::string instance = mf->GetSafeDefinition("CMAKE_GENERATOR_INSTANCE");
|
||||
if (!this->SetGeneratorInstance(instance, mf)) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return {};
|
||||
}
|
||||
return this->cmGlobalVisualStudio14Generator::FindMSBuildCommandEarly(mf);
|
||||
|
||||
@@ -556,7 +556,7 @@ void cmGlobalXCodeGenerator::AddExtraIDETargets()
|
||||
void cmGlobalXCodeGenerator::Generate()
|
||||
{
|
||||
this->cmGlobalGenerator::Generate();
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
mf.GetCMakeInstance()->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"A duplicate ELSE command was found inside an IF block.", elseBT);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
mf.GetCMakeInstance()->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"An ELSEIF command was found after an ELSE command.", elseifBT);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
cmStrCat(cmIfCommandError(expandedArguments), errorString);
|
||||
mf.GetCMakeInstance()->IssueMessage(messType, err, elseifBT);
|
||||
if (messType == MessageType::FATAL_ERROR) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ bool cmIfCommand(std::vector<cmListFileArgument> const& args,
|
||||
cmStrCat("if ", cmIfCommandError(expandedArguments), errorString);
|
||||
if (status == MessageType::FATAL_ERROR) {
|
||||
makefile.IssueMessage(MessageType::FATAL_ERROR, err);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
makefile.IssueMessage(status, err);
|
||||
|
||||
@@ -177,7 +177,7 @@ bool cmIncludeCommand(std::vector<std::string> const& args,
|
||||
resultVarName, readit ? fname_abs.c_str() : "NOTFOUND");
|
||||
}
|
||||
|
||||
if (!optional && !readit && !cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (!optional && !readit && !cmSystemTools::GetFatalErrorOccurred()) {
|
||||
std::string m = cmStrCat("could not load requested file:\n ", fname);
|
||||
status.SetError(m);
|
||||
return false;
|
||||
|
||||
@@ -78,7 +78,7 @@ void cmListFileParser::IssueError(const std::string& text) const
|
||||
cmListFileBacktrace lfbt = this->Backtrace;
|
||||
lfbt = lfbt.Push(lfc);
|
||||
this->Messenger->IssueMessage(MessageType::FATAL_ERROR, text, lfbt);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
bool cmListFileParser::ParseFile(const char* filename)
|
||||
@@ -174,7 +174,7 @@ bool cmListFileParser::Parse()
|
||||
MessageType::FATAL_ERROR,
|
||||
"Flow control statements are not properly nested.",
|
||||
this->Backtrace.Push(*badNesting));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ void cmLocalGenerator::ProcessEvaluationFiles(
|
||||
{
|
||||
for (const auto& geef : this->Makefile->GetEvaluationFiles()) {
|
||||
geef->Generate(this);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return;
|
||||
}
|
||||
std::vector<std::string> files = geef->GetFiles();
|
||||
@@ -1982,7 +1982,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
||||
"CMAKE_" + lang + "_COMPILER_ID") == "MSVC" ||
|
||||
this->Makefile->GetSafeDefinition(
|
||||
"CMAKE_" + lang + "_SIMULATE_ID") == "MSVC") &&
|
||||
!cmSystemTools::GetErrorOccuredFlag()) {
|
||||
!cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// The compiler uses the MSVC ABI so it needs a known runtime library.
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"MSVC_RUNTIME_LIBRARY value '" +
|
||||
@@ -2013,7 +2013,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
||||
"CMAKE_" + lang + "_COMPILER_ID") == "OpenWatcom" ||
|
||||
this->Makefile->GetSafeDefinition(
|
||||
"CMAKE_" + lang + "_SIMULATE_ID") == "OpenWatcom") &&
|
||||
!cmSystemTools::GetErrorOccuredFlag()) {
|
||||
!cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// The compiler uses the Watcom ABI so it needs a known runtime
|
||||
// library.
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
|
||||
@@ -1332,7 +1332,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
|
||||
{
|
||||
// read in the target info file
|
||||
if (!this->Makefile->ReadListFile(tgtInfo) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmSystemTools::GetErrorOccurredFlag()) {
|
||||
cmSystemTools::Error("Target DependInfo.cmake file not found");
|
||||
}
|
||||
|
||||
@@ -1497,7 +1497,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
|
||||
cmStrCat(this->GetCurrentBinaryDirectory(),
|
||||
"/CMakeFiles/CMakeDirectoryInformation.cmake");
|
||||
if (mf->ReadListFile(dirInfoFile) &&
|
||||
!cmSystemTools::GetErrorOccuredFlag()) {
|
||||
!cmSystemTools::GetErrorOccurredFlag()) {
|
||||
haveDirectoryInfo = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ bool cmMakeDirectoryCommand(std::vector<std::string> const& args,
|
||||
std::string e = "attempted to create a directory: " + args[0] +
|
||||
" into a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
cmSystemTools::MakeDirectory(args[0]);
|
||||
|
||||
+19
-19
@@ -417,7 +417,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
||||
std::ostringstream e;
|
||||
e << "Maximum recursion depth of " << depth << " exceeded";
|
||||
this->IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
||||
if (cmState::Command command =
|
||||
this->GetState()->GetCommandByExactName(lff.LowerCaseName())) {
|
||||
// Decide whether to invoke the command.
|
||||
if (!cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (!cmSystemTools::GetFatalErrorOccurred()) {
|
||||
// if trace is enabled, print out invoke information
|
||||
if (this->GetCMakeInstance()->GetTrace()) {
|
||||
this->PrintCommandTrace(lff, this->Backtrace);
|
||||
@@ -442,17 +442,17 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
||||
}
|
||||
result = false;
|
||||
if (this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (!cmSystemTools::GetFatalErrorOccurred()) {
|
||||
std::string error =
|
||||
cmStrCat("Unknown CMake command \"", lff.OriginalName(), "\".");
|
||||
this->IssueMessage(MessageType::FATAL_ERROR, error);
|
||||
result = false;
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@ bool cmMakefile::ReadDependentFile(const std::string& filename,
|
||||
}
|
||||
|
||||
this->RunListFile(listFile, filenametoread);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
incScope.Quiet();
|
||||
}
|
||||
return true;
|
||||
@@ -711,7 +711,7 @@ bool cmMakefile::ReadListFile(const std::string& filename)
|
||||
}
|
||||
|
||||
this->RunListFile(listFile, filenametoread);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
scope.Quiet();
|
||||
}
|
||||
return true;
|
||||
@@ -732,7 +732,7 @@ bool cmMakefile::ReadListFileAsString(const std::string& content,
|
||||
}
|
||||
|
||||
this->RunListFile(listFile, filenametoread);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
scope.Quiet();
|
||||
}
|
||||
return true;
|
||||
@@ -762,7 +762,7 @@ void cmMakefile::RunListFile(cmListFile const& listFile,
|
||||
for (size_t i = 0; i < numberFunctions; ++i) {
|
||||
cmExecutionStatus status(*this);
|
||||
this->ExecuteCommand(listFile.Functions[i], status);
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
break;
|
||||
}
|
||||
if (status.GetReturnInvoked()) {
|
||||
@@ -792,7 +792,7 @@ void cmMakefile::RunListFile(cmListFile const& listFile,
|
||||
|
||||
cmExecutionStatus status(*this);
|
||||
this->ExecuteCommand(d.Command, status, std::move(id));
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -838,7 +838,7 @@ void cmMakefile::EnforceDirectoryLevelRules() const
|
||||
// NEW behavior is to issue an error.
|
||||
this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR,
|
||||
msg.str(), this->Backtrace);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1685,7 +1685,7 @@ void cmMakefile::Configure()
|
||||
this->Defer = cm::make_unique<DeferCommands>();
|
||||
this->RunListFile(listFile, currentStart, this->Defer.get());
|
||||
this->Defer.reset();
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
scope.Quiet();
|
||||
}
|
||||
|
||||
@@ -2618,7 +2618,7 @@ const std::string& cmMakefile::ExpandVariablesInString(
|
||||
// If it's an error in either case, just report the error...
|
||||
if (mtype != MessageType::LOG) {
|
||||
if (mtype == MessageType::FATAL_ERROR) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
this->IssueMessage(mtype, errorstr);
|
||||
}
|
||||
@@ -3282,7 +3282,7 @@ bool cmMakefile::ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
|
||||
cmExpandList(value, outArgs);
|
||||
}
|
||||
}
|
||||
return !cmSystemTools::GetFatalErrorOccured();
|
||||
return !cmSystemTools::GetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
bool cmMakefile::ExpandArguments(
|
||||
@@ -3314,7 +3314,7 @@ bool cmMakefile::ExpandArguments(
|
||||
}
|
||||
}
|
||||
}
|
||||
return !cmSystemTools::GetFatalErrorOccured();
|
||||
return !cmSystemTools::GetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
void cmMakefile::AddFunctionBlocker(std::unique_ptr<cmFunctionBlocker> fb)
|
||||
@@ -3509,7 +3509,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"Failed to set working directory to " + bindir + " : " +
|
||||
std::strerror(workdir.GetLastResult()));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
this->IsSourceFileTryCompile = false;
|
||||
return 1;
|
||||
}
|
||||
@@ -3525,7 +3525,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
"Global generator '" +
|
||||
this->GetGlobalGenerator()->GetName() +
|
||||
"' could not be created.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
this->IsSourceFileTryCompile = false;
|
||||
return 1;
|
||||
}
|
||||
@@ -3597,7 +3597,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
if (cm.Configure() != 0) {
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"Failed to configure test project build system.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
this->IsSourceFileTryCompile = false;
|
||||
return 1;
|
||||
}
|
||||
@@ -3605,7 +3605,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
if (cm.Generate() != 0) {
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"Failed to generate test project build system.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
this->IsSourceFileTryCompile = false;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ bool cmMessageCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
|
||||
if (fatal) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ static void displayMessage(MessageType t, std::ostringstream& msg)
|
||||
md.desiredColor = getMessageColor(t);
|
||||
if (t == MessageType::FATAL_ERROR || t == MessageType::INTERNAL_ERROR ||
|
||||
t == MessageType::DEPRECATION_ERROR || t == MessageType::AUTHOR_ERROR) {
|
||||
cmSystemTools::SetErrorOccured();
|
||||
cmSystemTools::SetErrorOccurred();
|
||||
md.title = "Error";
|
||||
cmSystemTools::Message(msg.str(), md);
|
||||
} else {
|
||||
|
||||
@@ -127,7 +127,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
|
||||
status.GetMakefile().IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"PARSE_ARGV must be called with exactly 6 arguments.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
parseFromArgV = true;
|
||||
@@ -136,7 +136,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
|
||||
status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR,
|
||||
"PARSE_ARGV index '" + *argIter +
|
||||
"' is not an unsigned integer");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
argIter++; // move past N
|
||||
@@ -190,7 +190,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
|
||||
"PARSE_ARGV called with ARGC='" +
|
||||
argc +
|
||||
"' that is not an unsigned integer");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
for (unsigned long i = argvStart; i < count; ++i) {
|
||||
@@ -201,7 +201,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
|
||||
status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR,
|
||||
"PARSE_ARGV called with " +
|
||||
argName.str() + " not set");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
list.emplace_back(*arg);
|
||||
|
||||
@@ -314,7 +314,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
|
||||
// Make sure the project does not use any ancient policies.
|
||||
if (!ancientPolicies.empty()) {
|
||||
DiagnoseAncientPolicies(ancientPolicies, majorVer, minorVer, patchVer, mf);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (haveLanguages) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"LANGUAGES may be specified at most once.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
haveLanguages = true;
|
||||
@@ -121,7 +121,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (haveVersion) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"VERSION may be specified at most once.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
haveVersion = true;
|
||||
@@ -140,7 +140,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (haveDescription) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"DESCRIPTION may be specified at most once.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
haveDescription = true;
|
||||
@@ -159,7 +159,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (haveHomepage) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"HOMEPAGE_URL may be specified at most once.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
haveHomepage = true;
|
||||
@@ -200,7 +200,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"project with VERSION, DESCRIPTION or HOMEPAGE_URL must "
|
||||
"use LANGUAGES before language names.");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
if (haveLanguages && languages.empty()) {
|
||||
@@ -214,7 +214,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (cmp0048 == cmPolicies::OLD || cmp0048 == cmPolicies::WARN) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"VERSION not allowed unless CMP0048 is set to NEW");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
if (!vx.find(version)) {
|
||||
std::string e = R"(VERSION ")" + version + R"(" format invalid.)";
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR, e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ static bool IncludeByVariable(cmExecutionStatus& status,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -503,7 +503,7 @@ bool cmState::AddScriptedCommand(std::string const& name, BT<Command> command,
|
||||
cmStrCat("Built-in flow control command \"", sName,
|
||||
"\" cannot be overridden."),
|
||||
command.Backtrace);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,8 +156,8 @@ static int cm_archive_read_open_file(struct archive* a, const char* file,
|
||||
|
||||
bool cmSystemTools::s_RunCommandHideConsole = false;
|
||||
bool cmSystemTools::s_DisableRunCommandOutput = false;
|
||||
bool cmSystemTools::s_ErrorOccured = false;
|
||||
bool cmSystemTools::s_FatalErrorOccured = false;
|
||||
bool cmSystemTools::s_ErrorOccurred = false;
|
||||
bool cmSystemTools::s_FatalErrorOccurred = false;
|
||||
bool cmSystemTools::s_ForceUnixPaths = false;
|
||||
|
||||
// replace replace with with as many times as it shows up in source.
|
||||
@@ -212,7 +212,7 @@ std::string cmSystemTools::HelpFileName(cm::string_view str)
|
||||
void cmSystemTools::Error(const std::string& m)
|
||||
{
|
||||
std::string message = "CMake Error: " + m;
|
||||
cmSystemTools::s_ErrorOccured = true;
|
||||
cmSystemTools::s_ErrorOccurred = true;
|
||||
cmSystemTools::Message(message, "Error");
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -77,28 +77,28 @@ public:
|
||||
static bool GetInterruptFlag();
|
||||
|
||||
//! Return true if there was an error at any point.
|
||||
static bool GetErrorOccuredFlag()
|
||||
static bool GetErrorOccurredFlag()
|
||||
{
|
||||
return cmSystemTools::s_ErrorOccured ||
|
||||
cmSystemTools::s_FatalErrorOccured || GetInterruptFlag();
|
||||
return cmSystemTools::s_ErrorOccurred ||
|
||||
cmSystemTools::s_FatalErrorOccurred || GetInterruptFlag();
|
||||
}
|
||||
//! If this is set to true, cmake stops processing commands.
|
||||
static void SetFatalErrorOccured()
|
||||
static void SetFatalErrorOccurred()
|
||||
{
|
||||
cmSystemTools::s_FatalErrorOccured = true;
|
||||
cmSystemTools::s_FatalErrorOccurred = true;
|
||||
}
|
||||
static void SetErrorOccured() { cmSystemTools::s_ErrorOccured = true; }
|
||||
static void SetErrorOccurred() { cmSystemTools::s_ErrorOccurred = true; }
|
||||
//! Return true if there was an error at any point.
|
||||
static bool GetFatalErrorOccured()
|
||||
static bool GetFatalErrorOccurred()
|
||||
{
|
||||
return cmSystemTools::s_FatalErrorOccured || GetInterruptFlag();
|
||||
return cmSystemTools::s_FatalErrorOccurred || GetInterruptFlag();
|
||||
}
|
||||
|
||||
//! Set the error occurred flag and fatal error back to false
|
||||
static void ResetErrorOccuredFlag()
|
||||
static void ResetErrorOccurredFlag()
|
||||
{
|
||||
cmSystemTools::s_FatalErrorOccured = false;
|
||||
cmSystemTools::s_ErrorOccured = false;
|
||||
cmSystemTools::s_FatalErrorOccurred = false;
|
||||
cmSystemTools::s_ErrorOccurred = false;
|
||||
}
|
||||
|
||||
//! Return true if the path is a framework
|
||||
@@ -541,7 +541,7 @@ public:
|
||||
private:
|
||||
static bool s_ForceUnixPaths;
|
||||
static bool s_RunCommandHideConsole;
|
||||
static bool s_ErrorOccured;
|
||||
static bool s_FatalErrorOccured;
|
||||
static bool s_ErrorOccurred;
|
||||
static bool s_FatalErrorOccurred;
|
||||
static bool s_DisableRunCommandOutput;
|
||||
};
|
||||
@@ -130,7 +130,7 @@ bool cmTargetLinkLibrariesCommand(std::vector<std::string> const& args,
|
||||
break;
|
||||
case MessageType::FATAL_ERROR:
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR, e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -361,7 +361,7 @@ bool cmTargetLinkLibrariesCommand(std::vector<std::string> const& args,
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
cmStrCat("The \"", LinkLibraryTypeNames[llt],
|
||||
"\" argument must be followed by a library."));
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
|
||||
const cmPolicies::PolicyStatus policy22Status =
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
if (cmValue loc = GetLocation(tgt, prop, mf)) {
|
||||
return loc;
|
||||
}
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return nullptr;
|
||||
}
|
||||
if (prop == "SOURCES") {
|
||||
|
||||
@@ -105,7 +105,7 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
if (status.GetContinueInvoked()) {
|
||||
break;
|
||||
}
|
||||
if (cmSystemTools::GetFatalErrorOccured()) {
|
||||
if (cmSystemTools::GetFatalErrorOccurred()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
}
|
||||
mf.GetCMakeInstance()->IssueMessage(messageType, err, whileBT);
|
||||
if (messageType == MessageType::FATAL_ERROR) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ bool cmWriteFileCommand(std::vector<std::string> const& args,
|
||||
std::string e =
|
||||
"attempted to write a file: " + fileName + " into a source directory.";
|
||||
status.SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -2002,7 +2002,7 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
|
||||
}
|
||||
cmSystemTools::Message(warning.str());
|
||||
// avoid reconfigure if there were errors
|
||||
if (!cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (!cmSystemTools::GetErrorOccurredFlag()) {
|
||||
// re-run configure
|
||||
return this->Configure();
|
||||
}
|
||||
@@ -2287,7 +2287,7 @@ int cmake::ActualConfigure()
|
||||
this->State->SaveVerificationScript(this->GetHomeOutputDirectory(),
|
||||
this->Messenger.get());
|
||||
this->SaveCache(this->GetHomeOutputDirectory());
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -2401,7 +2401,7 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
||||
{
|
||||
// Process the arguments
|
||||
this->SetArgs(args);
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return -1;
|
||||
}
|
||||
if (this->GetWorkingMode() == HELP_MODE) {
|
||||
@@ -2458,7 +2458,7 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
||||
|
||||
// In script mode we terminate after running the script.
|
||||
if (this->GetWorkingMode() != NORMAL_MODE) {
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -2532,7 +2532,7 @@ int cmake::Generate()
|
||||
if (this->WarnUnusedCli) {
|
||||
this->RunCheckForUnusedVariables();
|
||||
}
|
||||
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||
if (cmSystemTools::GetErrorOccurredFlag()) {
|
||||
return -1;
|
||||
}
|
||||
// Save the cache again after a successful Generate so that any internal
|
||||
@@ -2892,7 +2892,7 @@ int cmake::CheckBuildSystem()
|
||||
cmGlobalGenerator gg(&cm);
|
||||
cmMakefile mf(&gg, cm.GetCurrentSnapshot());
|
||||
if (!mf.ReadListFile(this->CheckBuildSystemArgument) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmSystemTools::GetErrorOccurredFlag()) {
|
||||
if (verbose) {
|
||||
std::ostringstream msg;
|
||||
msg << "Re-run cmake error reading : " << this->CheckBuildSystemArgument
|
||||
|
||||
Reference in new issue
Block a user