mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Merge topic 'dead-code-removal'
fdd341ebcmFindCommon: remove unused function SetMakefile67a8d907cmExecutionStatus: Remove arguments from setters0c519c70bootstrap: Remove leftovers from cmBootstrapCommands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !821
This commit is contained in:
@@ -41,7 +41,7 @@ bool cmBreakCommand::InitialPass(std::vector<std::string> const& args,
|
||||
}
|
||||
}
|
||||
|
||||
status.SetBreakInvoked(true);
|
||||
status.SetBreakInvoked();
|
||||
|
||||
if (!args.empty()) {
|
||||
bool issueMessage = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ bool cmContinueCommand::InitialPass(std::vector<std::string> const& args,
|
||||
return true;
|
||||
}
|
||||
|
||||
status.SetContinueInvoked(true);
|
||||
status.SetContinueInvoked();
|
||||
|
||||
if (!args.empty()) {
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
||||
|
||||
@@ -11,16 +11,13 @@
|
||||
class cmExecutionStatus
|
||||
{
|
||||
public:
|
||||
cmExecutionStatus() { this->Clear(); }
|
||||
|
||||
void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
|
||||
bool GetReturnInvoked() { return this->ReturnInvoked; }
|
||||
|
||||
void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
|
||||
bool GetBreakInvoked() { return this->BreakInvoked; }
|
||||
|
||||
void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
|
||||
bool GetContinueInvoked() { return this->ContinueInvoked; }
|
||||
cmExecutionStatus()
|
||||
: ReturnInvoked(false)
|
||||
, BreakInvoked(false)
|
||||
, ContinueInvoked(false)
|
||||
, NestedError(false)
|
||||
{
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
@@ -29,8 +26,18 @@ public:
|
||||
this->ContinueInvoked = false;
|
||||
this->NestedError = false;
|
||||
}
|
||||
void SetNestedError(bool val) { this->NestedError = val; }
|
||||
bool GetNestedError() { return this->NestedError; }
|
||||
|
||||
void SetReturnInvoked() { this->ReturnInvoked = true; }
|
||||
bool GetReturnInvoked() const { return this->ReturnInvoked; }
|
||||
|
||||
void SetBreakInvoked() { this->BreakInvoked = true; }
|
||||
bool GetBreakInvoked() const { return this->BreakInvoked; }
|
||||
|
||||
void SetContinueInvoked() { this->ContinueInvoked = true; }
|
||||
bool GetContinueInvoked() const { return this->ContinueInvoked; }
|
||||
|
||||
void SetNestedError() { this->NestedError = true; }
|
||||
bool GetNestedError() const { return this->NestedError; }
|
||||
|
||||
private:
|
||||
bool ReturnInvoked;
|
||||
|
||||
@@ -334,15 +334,3 @@ void cmFindCommon::ComputeFinalPaths()
|
||||
std::for_each(this->SearchPaths.begin(), this->SearchPaths.end(),
|
||||
&AddTrailingSlash);
|
||||
}
|
||||
|
||||
void cmFindCommon::SetMakefile(cmMakefile* makefile)
|
||||
{
|
||||
cmCommand::SetMakefile(makefile);
|
||||
|
||||
// If we are building for Apple (OSX or also iphone), make sure
|
||||
// that frameworks and bundles are searched first.
|
||||
if (this->Makefile->IsOn("APPLE")) {
|
||||
this->SearchFrameworkFirst = true;
|
||||
this->SearchAppBundleFirst = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "cmPathLabel.h"
|
||||
#include "cmSearchPath.h"
|
||||
|
||||
class cmMakefile;
|
||||
|
||||
/** \class cmFindCommon
|
||||
* \brief Base class for FIND_XXX implementations.
|
||||
*
|
||||
@@ -105,7 +103,6 @@ protected:
|
||||
|
||||
bool CheckCommonArgument(std::string const& arg);
|
||||
void AddPathSuffix(std::string const& arg);
|
||||
void SetMakefile(cmMakefile* makefile);
|
||||
|
||||
bool NoDefaultPath;
|
||||
bool NoCMakePath;
|
||||
|
||||
@@ -58,7 +58,7 @@ bool cmForEachFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff,
|
||||
status.Clear();
|
||||
mf.ExecuteCommand(this->Functions[c], status);
|
||||
if (status.GetReturnInvoked()) {
|
||||
inStatus.SetReturnInvoked(true);
|
||||
inStatus.SetReturnInvoked();
|
||||
// restore the variable to its prior value
|
||||
mf.AddDefinition(this->Args[0], oldDef.c_str());
|
||||
return true;
|
||||
|
||||
@@ -121,7 +121,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass(
|
||||
// The error message should have already included the call stack
|
||||
// so we do not need to report an error here.
|
||||
functionScope.Quiet();
|
||||
inStatus.SetNestedError(true);
|
||||
inStatus.SetNestedError();
|
||||
return false;
|
||||
}
|
||||
if (status.GetReturnInvoked()) {
|
||||
|
||||
@@ -137,15 +137,15 @@ bool cmIfFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff,
|
||||
status.Clear();
|
||||
mf.ExecuteCommand(this->Functions[c], status);
|
||||
if (status.GetReturnInvoked()) {
|
||||
inStatus.SetReturnInvoked(true);
|
||||
inStatus.SetReturnInvoked();
|
||||
return true;
|
||||
}
|
||||
if (status.GetBreakInvoked()) {
|
||||
inStatus.SetBreakInvoked(true);
|
||||
inStatus.SetBreakInvoked();
|
||||
return true;
|
||||
}
|
||||
if (status.GetContinueInvoked()) {
|
||||
inStatus.SetContinueInvoked(true);
|
||||
inStatus.SetContinueInvoked();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,15 +151,15 @@ bool cmMacroHelperCommand::InvokeInitialPass(
|
||||
// The error message should have already included the call stack
|
||||
// so we do not need to report an error here.
|
||||
macroScope.Quiet();
|
||||
inStatus.SetNestedError(true);
|
||||
inStatus.SetNestedError();
|
||||
return false;
|
||||
}
|
||||
if (status.GetReturnInvoked()) {
|
||||
inStatus.SetReturnInvoked(true);
|
||||
inStatus.SetReturnInvoked();
|
||||
return true;
|
||||
}
|
||||
if (status.GetBreakInvoked()) {
|
||||
inStatus.SetBreakInvoked(true);
|
||||
inStatus.SetBreakInvoked();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
|
||||
{
|
||||
if (!this->ExecutionStatusStack.empty()) {
|
||||
if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) {
|
||||
this->ExecutionStatusStack.back()->SetNestedError(true);
|
||||
this->ExecutionStatusStack.back()->SetNestedError();
|
||||
}
|
||||
}
|
||||
this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace());
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
bool cmReturnCommand::InitialPass(std::vector<std::string> const&,
|
||||
cmExecutionStatus& status)
|
||||
{
|
||||
status.SetReturnInvoked(true);
|
||||
status.SetReturnInvoked();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ bool cmWhileFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff,
|
||||
cmExecutionStatus status;
|
||||
mf.ExecuteCommand(this->Functions[c], status);
|
||||
if (status.GetReturnInvoked()) {
|
||||
inStatus.SetReturnInvoked(true);
|
||||
inStatus.SetReturnInvoked();
|
||||
return true;
|
||||
}
|
||||
if (status.GetBreakInvoked()) {
|
||||
|
||||
@@ -1454,8 +1454,6 @@ for a in ${CMAKE_CXX_SOURCES}; do
|
||||
echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
|
||||
echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
|
||||
done
|
||||
echo "cmBootstrapCommands1.o : $cmBootstrapCommands1Deps" >> "${cmake_bootstrap_dir}/Makefile"
|
||||
echo "cmBootstrapCommands2.o : $cmBootstrapCommands2Deps" >> "${cmake_bootstrap_dir}/Makefile"
|
||||
for a in ${CMAKE_C_SOURCES}; do
|
||||
src=`cmake_escape "${cmake_source_dir}/Source/${a}.c"`
|
||||
echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
|
||||
|
||||
Reference in New Issue
Block a user