Merge topic 'minor-cleanups'
51e48637
VS: Remove impossible condition.203eada6
cmMakefile: Remove Configured state.5642449a
cmCommand: Remove IsDiscouraged interface.77c6a339
cmSetCommand: Re-use local named variable.732f5511
cmSetCommand: Fix typo in comment.8544f16d
cmGlobalGenerator: Devirtualize method.9096daaf
Ninja: Remove unused variable.
This commit is contained in:
commit
6c6a8c5d5a
|
@ -23,7 +23,6 @@ public:
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const {return "build_name";}
|
virtual std::string GetName() const {return "build_name";}
|
||||||
virtual bool IsScriptable() const { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -101,15 +101,6 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This determines if usage of the method is discouraged or not.
|
|
||||||
* This is currently only used for generating the documentation.
|
|
||||||
*/
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used to avoid including this command
|
* This is used to avoid including this command
|
||||||
* in documentation. This is mainly used by
|
* in documentation. This is mainly used by
|
||||||
|
|
|
@ -50,12 +50,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable() const { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmExecProgramCommand, cmCommand);
|
cmTypeMacro(cmExecProgramCommand, cmCommand);
|
||||||
private:
|
private:
|
||||||
static bool RunCommand(const char* command, std::string& output,
|
static bool RunCommand(const char* command, std::string& output,
|
||||||
|
|
|
@ -22,7 +22,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "export_library_dependencies";}
|
virtual std::string GetName() const { return "export_library_dependencies";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
|
|
||||||
virtual void FinalPass();
|
virtual void FinalPass();
|
||||||
virtual bool HasFinalPass() const { return true; }
|
virtual bool HasFinalPass() const { return true; }
|
||||||
|
|
|
@ -124,7 +124,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Try to determine system information, get it from another generator
|
* Try to determine system information, get it from another generator
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
|
void EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
|
||||||
cmMakefile* mf);
|
cmMakefile* mf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -192,7 +192,7 @@ void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros()
|
||||||
cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
|
cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
|
||||||
std::string dir = this->GetUserMacrosDirectory();
|
std::string dir = this->GetUserMacrosDirectory();
|
||||||
|
|
||||||
if (mf != 0 && dir != "")
|
if (dir != "")
|
||||||
{
|
{
|
||||||
std::string src = mf->GetRequiredDefinition("CMAKE_ROOT");
|
std::string src = mf->GetRequiredDefinition("CMAKE_ROOT");
|
||||||
src += "/Templates/" CMAKE_VSMACROS_FILENAME;
|
src += "/Templates/" CMAKE_VSMACROS_FILENAME;
|
||||||
|
@ -233,13 +233,12 @@ cmGlobalVisualStudioGenerator
|
||||||
std::string dir = this->GetUserMacrosDirectory();
|
std::string dir = this->GetUserMacrosDirectory();
|
||||||
|
|
||||||
// Only really try to call the macro if:
|
// Only really try to call the macro if:
|
||||||
// - mf is non-NULL
|
|
||||||
// - there is a UserMacrosDirectory
|
// - there is a UserMacrosDirectory
|
||||||
// - the CMake vsmacros file exists
|
// - the CMake vsmacros file exists
|
||||||
// - the CMake vsmacros file is registered
|
// - the CMake vsmacros file is registered
|
||||||
// - there were .sln/.vcproj files changed during generation
|
// - there were .sln/.vcproj files changed during generation
|
||||||
//
|
//
|
||||||
if (mf != 0 && dir != "")
|
if (dir != "")
|
||||||
{
|
{
|
||||||
std::string macrosFile = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME;
|
std::string macrosFile = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME;
|
||||||
std::string nextSubkeyName;
|
std::string nextSubkeyName;
|
||||||
|
|
|
@ -52,12 +52,6 @@ public:
|
||||||
virtual void FinalPass();
|
virtual void FinalPass();
|
||||||
virtual bool HasFinalPass() const { return !this->IsFilesForm; }
|
virtual bool HasFinalPass() const { return !this->IsFilesForm; }
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmInstallFilesCommand, cmCommand);
|
cmTypeMacro(cmInstallFilesCommand, cmCommand);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -53,12 +53,6 @@ public:
|
||||||
|
|
||||||
virtual bool HasFinalPass() const { return true; }
|
virtual bool HasFinalPass() const { return true; }
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmInstallProgramsCommand, cmCommand);
|
cmTypeMacro(cmInstallProgramsCommand, cmCommand);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -44,12 +44,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "install_targets";}
|
virtual std::string GetName() const { return "install_targets";}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmInstallTargetsCommand, cmCommand);
|
cmTypeMacro(cmInstallTargetsCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "link_libraries";}
|
virtual std::string GetName() const { return "link_libraries";}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
|
cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const {return "load_command";}
|
virtual std::string GetName() const {return "load_command";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
cmTypeMacro(cmLoadCommandCommand, cmCommand);
|
cmTypeMacro(cmLoadCommandCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -51,12 +51,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable() const { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
|
cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
||||||
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
|
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
|
||||||
this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
|
this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
|
||||||
|
|
||||||
this->Configured = false;
|
|
||||||
this->SuppressWatches = false;
|
this->SuppressWatches = false;
|
||||||
|
|
||||||
// Setup the default include file regular expression (match everything).
|
// Setup the default include file regular expression (match everything).
|
||||||
|
@ -1658,7 +1657,6 @@ void cmMakefile::Configure()
|
||||||
cmParseFileScope pfs(this);
|
cmParseFileScope pfs(this);
|
||||||
if (!listFile.ParseFile(currentStart.c_str(), this->IsRootMakefile(), this))
|
if (!listFile.ParseFile(currentStart.c_str(), this->IsRootMakefile(), this))
|
||||||
{
|
{
|
||||||
this->SetConfigured();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1679,7 +1677,6 @@ void cmMakefile::Configure()
|
||||||
}
|
}
|
||||||
|
|
||||||
this->AddCMakeDependFilesFromUser();
|
this->AddCMakeDependFilesFromUser();
|
||||||
this->SetConfigured();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmMakefile::ConfigureSubDirectory(cmMakefile *mf)
|
void cmMakefile::ConfigureSubDirectory(cmMakefile *mf)
|
||||||
|
@ -1723,7 +1720,6 @@ void cmMakefile::ConfigureSubDirectory(cmMakefile *mf)
|
||||||
// NEW behavior prints the error.
|
// NEW behavior prints the error.
|
||||||
this->IssueMessage(cmake::FATAL_ERROR, e.str());
|
this->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||||
}
|
}
|
||||||
mf->SetConfigured();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// finally configure the subdir
|
// finally configure the subdir
|
||||||
|
|
|
@ -750,9 +750,6 @@ public:
|
||||||
cmStringRange GetCompileDefinitionsEntries() const;
|
cmStringRange GetCompileDefinitionsEntries() const;
|
||||||
cmBacktraceRange GetCompileDefinitionsBacktraces() const;
|
cmBacktraceRange GetCompileDefinitionsBacktraces() const;
|
||||||
|
|
||||||
bool IsConfigured() const { return this->Configured; }
|
|
||||||
void SetConfigured(){ this->Configured = true; }
|
|
||||||
|
|
||||||
void AddQtUiFileWithOptions(cmSourceFile *sf);
|
void AddQtUiFileWithOptions(cmSourceFile *sf);
|
||||||
std::vector<cmSourceFile*> GetQtUiFilesWithOptions() const;
|
std::vector<cmSourceFile*> GetQtUiFilesWithOptions() const;
|
||||||
|
|
||||||
|
@ -988,7 +985,6 @@ private:
|
||||||
bool WarnUnused;
|
bool WarnUnused;
|
||||||
bool CheckSystemVars;
|
bool CheckSystemVars;
|
||||||
bool CheckCMP0000;
|
bool CheckCMP0000;
|
||||||
bool Configured;
|
|
||||||
bool IsSourceFileTryCompile;
|
bool IsSourceFileTryCompile;
|
||||||
mutable bool SuppressWatches;
|
mutable bool SuppressWatches;
|
||||||
};
|
};
|
||||||
|
|
|
@ -633,7 +633,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
std::string cmakeCommand =
|
std::string cmakeCommand =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
||||||
std::string dllname = targetOutput;
|
|
||||||
std::string name_of_def_file
|
std::string name_of_def_file
|
||||||
= target.GetSupportDirectory();
|
= target.GetSupportDirectory();
|
||||||
name_of_def_file += "/" + target.GetName();
|
name_of_def_file += "/" + target.GetName();
|
||||||
|
|
|
@ -23,7 +23,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "output_required_files";}
|
virtual std::string GetName() const { return "output_required_files";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
|
|
||||||
void ListDependencies(cmDependInformation const *info,
|
void ListDependencies(cmDependInformation const *info,
|
||||||
FILE *fout,
|
FILE *fout,
|
||||||
|
|
|
@ -47,12 +47,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const {return "remove";}
|
virtual std::string GetName() const {return "remove";}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmRemoveCommand, cmCommand);
|
cmTypeMacro(cmRemoveCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ bool cmSetCommand
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it will be cleared, then clear it if it isn;t already clear
|
// if it will be cleared, then clear it if it isn't already clear
|
||||||
if (currValue)
|
if (currValue)
|
||||||
{
|
{
|
||||||
cmSystemTools::PutEnv(putEnvArg);
|
cmSystemTools::PutEnv(putEnvArg);
|
||||||
|
@ -59,7 +59,7 @@ bool cmSetCommand
|
||||||
// SET (VAR) // Removes the definition of VAR.
|
// SET (VAR) // Removes the definition of VAR.
|
||||||
if (args.size() == 1)
|
if (args.size() == 1)
|
||||||
{
|
{
|
||||||
this->Makefile->RemoveDefinition(args[0]);
|
this->Makefile->RemoveDefinition(variable);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// SET (VAR PARENT_SCOPE) // Removes the definition of VAR
|
// SET (VAR PARENT_SCOPE) // Removes the definition of VAR
|
||||||
|
|
|
@ -44,12 +44,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "subdirs";}
|
virtual std::string GetName() const { return "subdirs";}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmSubdirCommand, cmCommand);
|
cmTypeMacro(cmSubdirCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "subdir_depends";}
|
virtual std::string GetName() const { return "subdir_depends";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
cmTypeMacro(cmSubdirDependsCommand, cmCommand);
|
cmTypeMacro(cmSubdirDependsCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ public:
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "use_mangled_mesa";}
|
virtual std::string GetName() const { return "use_mangled_mesa";}
|
||||||
virtual bool IsScriptable() const { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
protected:
|
protected:
|
||||||
void CopyAndFullPathMesaHeader(const char* source,
|
void CopyAndFullPathMesaHeader(const char* source,
|
||||||
const char* outdir);
|
const char* outdir);
|
||||||
|
|
|
@ -22,7 +22,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "utility_source";}
|
virtual std::string GetName() const { return "utility_source";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,7 +22,6 @@ public:
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args,
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
virtual std::string GetName() const { return "variable_requires";}
|
virtual std::string GetName() const { return "variable_requires";}
|
||||||
virtual bool IsDiscouraged() const { return true; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,12 +46,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::string GetName() const { return "write_file";}
|
virtual std::string GetName() const { return "write_file";}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
|
||||||
virtual bool IsDiscouraged() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTypeMacro(cmWriteFileCommand, cmCommand);
|
cmTypeMacro(cmWriteFileCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue