Make cmCommand not inherit from cmObject

This commit is contained in:
Daniel Pfeifer
2016-10-23 00:45:08 +02:00
parent 1e555a44aa
commit 9855ebf11a
129 changed files with 13 additions and 266 deletions

View File

@@ -47,8 +47,6 @@ public:
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE; cmExecutionStatus& status) CM_OVERRIDE;
cmTypeMacro(cmCTestBuildCommand, cmCTestHandlerCommand);
cmGlobalGenerator* GlobalGenerator; cmGlobalGenerator* GlobalGenerator;
protected: protected:

View File

@@ -26,8 +26,6 @@ public:
cmCTest* CTest; cmCTest* CTest;
cmCTestScriptHandler* CTestScriptHandler; cmCTestScriptHandler* CTestScriptHandler;
cmTypeMacro(cmCTestCommand, cmCommand);
}; };
#endif #endif

View File

@@ -39,8 +39,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_configure"; } std::string GetName() const CM_OVERRIDE { return "ctest_configure"; }
cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand);
protected: protected:
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;

View File

@@ -40,7 +40,7 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_coverage"; } std::string GetName() const CM_OVERRIDE { return "ctest_coverage"; }
cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand); typedef cmCTestHandlerCommand Superclass;
protected: protected:
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;

View File

@@ -51,8 +51,6 @@ public:
{ {
return "ctest_empty_binary_directory"; return "ctest_empty_binary_directory";
} }
cmTypeMacro(cmCTestEmptyBinaryDirectoryCommand, cmCTestCommand);
}; };
#endif #endif

View File

@@ -32,8 +32,6 @@ public:
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE; cmExecutionStatus& status) CM_OVERRIDE;
cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);
enum enum
{ {
ct_NONE, ct_NONE,

View File

@@ -39,8 +39,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_memcheck"; } std::string GetName() const CM_OVERRIDE { return "ctest_memcheck"; }
cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand);
protected: protected:
cmCTestGenericHandler* InitializeActualHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeActualHandler() CM_OVERRIDE;
}; };

View File

@@ -46,8 +46,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_read_custom_files"; } std::string GetName() const CM_OVERRIDE { return "ctest_read_custom_files"; }
cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand);
}; };
#endif #endif

View File

@@ -47,8 +47,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_run_script"; } std::string GetName() const CM_OVERRIDE { return "ctest_run_script"; }
cmTypeMacro(cmCTestRunScriptCommand, cmCTestCommand);
}; };
#endif #endif

View File

@@ -47,8 +47,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_sleep"; } std::string GetName() const CM_OVERRIDE { return "ctest_sleep"; }
cmTypeMacro(cmCTestSleepCommand, cmCTestCommand);
}; };
#endif #endif

View File

@@ -60,8 +60,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_start"; } std::string GetName() const CM_OVERRIDE { return "ctest_start"; }
cmTypeMacro(cmCTestStartCommand, cmCTestCommand);
private: private:
bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir); bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
bool CreateNewTag; bool CreateNewTag;

View File

@@ -55,7 +55,7 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_submit"; } std::string GetName() const CM_OVERRIDE { return "ctest_submit"; }
cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand); typedef cmCTestHandlerCommand Superclass;
protected: protected:
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;

View File

@@ -39,8 +39,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_test"; } std::string GetName() const CM_OVERRIDE { return "ctest_test"; }
cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand);
protected: protected:
virtual cmCTestGenericHandler* InitializeActualHandler(); virtual cmCTestGenericHandler* InitializeActualHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;

View File

@@ -59,8 +59,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "subdirs"; } std::string GetName() const CM_OVERRIDE { return "subdirs"; }
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
cmCTestTestHandler* TestHandler; cmCTestTestHandler* TestHandler;
}; };
@@ -140,8 +138,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; } std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; }
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
cmCTestTestHandler* TestHandler; cmCTestTestHandler* TestHandler;
}; };
@@ -214,8 +210,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "add_test"; } std::string GetName() const CM_OVERRIDE { return "add_test"; }
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
cmCTestTestHandler* TestHandler; cmCTestTestHandler* TestHandler;
}; };
@@ -254,8 +248,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "set_tests_properties"; } std::string GetName() const CM_OVERRIDE { return "set_tests_properties"; }
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);
cmCTestTestHandler* TestHandler; cmCTestTestHandler* TestHandler;
}; };

View File

@@ -39,8 +39,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_update"; } std::string GetName() const CM_OVERRIDE { return "ctest_update"; }
cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand);
protected: protected:
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
}; };

View File

@@ -41,7 +41,7 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "ctest_upload"; } std::string GetName() const CM_OVERRIDE { return "ctest_upload"; }
cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand); typedef cmCTestHandlerCommand Superclass;
protected: protected:
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;

View File

@@ -24,8 +24,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_compile_options"; } std::string GetName() const CM_OVERRIDE { return "add_compile_options"; }
cmTypeMacro(cmAddCompileOptionsCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "add_custom_command"; } std::string GetName() const CM_OVERRIDE { return "add_custom_command"; }
cmTypeMacro(cmAddCustomCommandCommand, cmCommand);
protected: protected:
bool CheckOutputs(const std::vector<std::string>& outputs); bool CheckOutputs(const std::vector<std::string>& outputs);
}; };

View File

@@ -31,8 +31,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_custom_target"; } std::string GetName() const CM_OVERRIDE { return "add_custom_target"; }
cmTypeMacro(cmAddCustomTargetCommand, cmCommand);
}; };
#endif #endif

View File

@@ -30,8 +30,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_definitions"; } std::string GetName() const CM_OVERRIDE { return "add_definitions"; }
cmTypeMacro(cmAddDefinitionsCommand, cmCommand);
}; };
#endif #endif

View File

@@ -29,8 +29,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_dependencies"; } std::string GetName() const CM_OVERRIDE { return "add_dependencies"; }
cmTypeMacro(cmAddDependenciesCommand, cmCommand);
}; };
#endif #endif

View File

@@ -30,8 +30,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_executable"; } std::string GetName() const CM_OVERRIDE { return "add_executable"; }
cmTypeMacro(cmAddExecutableCommand, cmCommand);
}; };
#endif #endif

View File

@@ -30,8 +30,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_library"; } std::string GetName() const CM_OVERRIDE { return "add_library"; }
cmTypeMacro(cmAddLibraryCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; } std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; }
cmTypeMacro(cmAddSubDirectoryCommand, cmCommand);
}; };
#endif #endif

View File

@@ -30,8 +30,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "add_test"; } std::string GetName() const CM_OVERRIDE { return "add_test"; }
cmTypeMacro(cmAddTestCommand, cmCommand);
private: private:
bool HandleNameMode(std::vector<std::string> const& args); bool HandleNameMode(std::vector<std::string> const& args);
}; };

View File

@@ -33,8 +33,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "aux_source_directory"; } std::string GetName() const CM_OVERRIDE { return "aux_source_directory"; }
cmTypeMacro(cmAuxSourceDirectoryCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "break"; } std::string GetName() const CM_OVERRIDE { return "break"; }
cmTypeMacro(cmBreakCommand, cmCommand);
}; };
#endif #endif

View File

@@ -40,8 +40,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "build_command"; } std::string GetName() const CM_OVERRIDE { return "build_command"; }
cmTypeMacro(cmBuildCommand, cmCommand);
private: private:
bool IgnoreErrors() const; bool IgnoreErrors() const;
}; };

View File

@@ -8,7 +8,6 @@
class cmBuildNameCommand : public cmCommand class cmBuildNameCommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmBuildNameCommand, cmCommand);
cmCommand* Clone() CM_OVERRIDE { return new cmBuildNameCommand; } cmCommand* Clone() CM_OVERRIDE { return new cmBuildNameCommand; }
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE; cmExecutionStatus& status) CM_OVERRIDE;

View File

@@ -44,8 +44,6 @@ public:
return "cmake_host_system_information"; return "cmake_host_system_information";
} }
cmTypeMacro(cmCMakeHostSystemInformationCommand, cmCommand);
private: private:
bool GetValue(cmsys::SystemInformation& info, std::string const& key, bool GetValue(cmsys::SystemInformation& info, std::string const& key,
std::string& value); std::string& value);

View File

@@ -35,8 +35,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "cmake_minimum_required"; } std::string GetName() const CM_OVERRIDE { return "cmake_minimum_required"; }
cmTypeMacro(cmCMakeMinimumRequired, cmCommand);
private: private:
std::vector<std::string> UnknownArguments; std::vector<std::string> UnknownArguments;
bool EnforceUnknownArguments(); bool EnforceUnknownArguments();

View File

@@ -36,8 +36,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "cmake_policy"; } std::string GetName() const CM_OVERRIDE { return "cmake_policy"; }
cmTypeMacro(cmCMakePolicyCommand, cmCommand);
private: private:
bool HandleSetMode(std::vector<std::string> const& args); bool HandleSetMode(std::vector<std::string> const& args);
bool HandleGetMode(std::vector<std::string> const& args); bool HandleGetMode(std::vector<std::string> const& args);

View File

@@ -19,11 +19,9 @@
* to support such features as enable/disable, inheritance, * to support such features as enable/disable, inheritance,
* documentation, and construction. * documentation, and construction.
*/ */
class cmCommand : public cmObject class cmCommand
{ {
public: public:
cmTypeMacro(cmCommand, cmObject);
/** /**
* Construct the command. By default it is enabled with no makefile. * Construct the command. By default it is enabled with no makefile.
*/ */
@@ -36,7 +34,7 @@ public:
/** /**
* Need virtual destructor to destroy real command type. * Need virtual destructor to destroy real command type.
*/ */
~cmCommand() CM_OVERRIDE {} virtual ~cmCommand() {}
/** /**
* Specify the makefile. * Specify the makefile.
@@ -92,12 +90,10 @@ public:
virtual bool IsScriptable() const { return false; } virtual bool IsScriptable() const { return false; }
/** /**
* This is used to avoid including this command * This determines if the command is defined in a cmake script.
* in documentation. This is mainly used by * It is the case for cmMacroHelperCommand and cmFunctionHelperCommand.
* cmMacroHelperCommand and cmFunctionHelperCommand
* which cannot provide appropriate documentation.
*/ */
virtual bool ShouldAppearInDocumentation() const { return true; } virtual bool IsUserDefined() const { return false; }
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.

View File

@@ -8,8 +8,6 @@
class cmConfigureFileCommand : public cmCommand class cmConfigureFileCommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmConfigureFileCommand, cmCommand);
cmCommand* Clone() CM_OVERRIDE { return new cmConfigureFileCommand; } cmCommand* Clone() CM_OVERRIDE { return new cmConfigureFileCommand; }
/** /**

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "continue"; } std::string GetName() const CM_OVERRIDE { return "continue"; }
cmTypeMacro(cmContinueCommand, cmCommand);
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ protected:
void FindOutputFile(const std::string& targetName, void FindOutputFile(const std::string& targetName,
cmStateEnums::TargetType targetType); cmStateEnums::TargetType targetType);
cmTypeMacro(cmCoreTryCompile, cmCommand);
std::string BinaryDirectory; std::string BinaryDirectory;
std::string OutputFile; std::string OutputFile;
std::string FindErrorMessage; std::string FindErrorMessage;

View File

@@ -29,8 +29,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "create_test_sourcelist"; } std::string GetName() const CM_OVERRIDE { return "create_test_sourcelist"; }
cmTypeMacro(cmCreateTestSourceList, cmCommand);
}; };
#endif #endif

View File

@@ -22,8 +22,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "define_property"; } std::string GetName() const CM_OVERRIDE { return "define_property"; }
cmTypeMacro(cmDefinePropertyCommand, cmCommand);
private: private:
std::string PropertyName; std::string PropertyName;
std::string BriefDocs; std::string BriefDocs;

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "else"; } std::string GetName() const CM_OVERRIDE { return "else"; }
cmTypeMacro(cmElseCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "elseif"; } std::string GetName() const CM_OVERRIDE { return "elseif"; }
cmTypeMacro(cmElseIfCommand, cmCommand);
}; };
#endif #endif

View File

@@ -32,8 +32,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "enable_language"; } std::string GetName() const CM_OVERRIDE { return "enable_language"; }
cmTypeMacro(cmEnableLanguageCommand, cmCommand);
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "enable_testing"; } std::string GetName() const CM_OVERRIDE { return "enable_testing"; }
cmTypeMacro(cmEnableTestingCommand, cmCommand);
}; };
#endif #endif

View File

@@ -44,8 +44,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "endforeach"; } std::string GetName() const CM_OVERRIDE { return "endforeach"; }
cmTypeMacro(cmEndForEachCommand, cmCommand);
}; };
#endif #endif

View File

@@ -44,8 +44,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "endfunction"; } std::string GetName() const CM_OVERRIDE { return "endfunction"; }
cmTypeMacro(cmEndFunctionCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "endif"; } std::string GetName() const CM_OVERRIDE { return "endif"; }
cmTypeMacro(cmEndIfCommand, cmCommand);
}; };
#endif #endif

View File

@@ -44,8 +44,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "endmacro"; } std::string GetName() const CM_OVERRIDE { return "endmacro"; }
cmTypeMacro(cmEndMacroCommand, cmCommand);
}; };
#endif #endif

View File

@@ -44,8 +44,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "endwhile"; } std::string GetName() const CM_OVERRIDE { return "endwhile"; }
cmTypeMacro(cmEndWhileCommand, cmCommand);
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ public:
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmExecProgramCommand, cmCommand);
private: private:
static bool RunCommand(const char* command, std::string& output, int& retVal, static bool RunCommand(const char* command, std::string& output, int& retVal,
const char* directory = CM_NULLPTR, const char* directory = CM_NULLPTR,

View File

@@ -35,8 +35,6 @@ public:
* This determines if the command is invoked when in script mode. * This determines if the command is invoked when in script mode.
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmExecuteProcessCommand, cmCommand);
}; };
#endif #endif

View File

@@ -35,8 +35,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "export"; } std::string GetName() const CM_OVERRIDE { return "export"; }
cmTypeMacro(cmExportCommand, cmCommand);
private: private:
cmCommandArgumentGroup ArgumentGroup; cmCommandArgumentGroup ArgumentGroup;
cmCAStringVector Targets; cmCAStringVector Targets;

View File

@@ -8,7 +8,6 @@
class cmExportLibraryDependenciesCommand : public cmCommand class cmExportLibraryDependenciesCommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
cmCommand* Clone() CM_OVERRIDE cmCommand* Clone() CM_OVERRIDE
{ {
return new cmExportLibraryDependenciesCommand; return new cmExportLibraryDependenciesCommand;

View File

@@ -14,8 +14,6 @@
class cmFLTKWrapUICommand : public cmCommand class cmFLTKWrapUICommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmFLTKWrapUICommand, cmCommand);
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */

View File

@@ -36,8 +36,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "file"; } std::string GetName() const CM_OVERRIDE { return "file"; }
cmTypeMacro(cmFileCommand, cmCommand);
protected: protected:
bool HandleRename(std::vector<std::string> const& args); bool HandleRename(std::vector<std::string> const& args);
bool HandleRemove(std::vector<std::string> const& args, bool recurse); bool HandleRemove(std::vector<std::string> const& args, bool recurse);

View File

@@ -20,7 +20,6 @@ public:
* the CMakeLists.txt file. * the CMakeLists.txt file.
*/ */
virtual bool ParseArguments(std::vector<std::string> const& args); virtual bool ParseArguments(std::vector<std::string> const& args);
cmTypeMacro(cmFindBase, cmFindCommon);
protected: protected:
void PrintFindStuff(); void PrintFindStuff();

View File

@@ -19,7 +19,6 @@ class cmFindCommon : public cmCommand
public: public:
cmFindCommon(); cmFindCommon();
~cmFindCommon() CM_OVERRIDE; ~cmFindCommon() CM_OVERRIDE;
cmTypeMacro(cmFindCommon, cmCommand);
protected: protected:
friend class cmSearchPath; friend class cmSearchPath;

View File

@@ -22,8 +22,6 @@ public:
*/ */
cmCommand* Clone() CM_OVERRIDE { return new cmFindFileCommand; } cmCommand* Clone() CM_OVERRIDE { return new cmFindFileCommand; }
std::string GetName() const CM_OVERRIDE { return "find_file"; } std::string GetName() const CM_OVERRIDE { return "find_file"; }
cmTypeMacro(cmFindFileCommand, cmFindPathCommand);
}; };
#endif #endif

View File

@@ -38,8 +38,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "find_library"; } std::string GetName() const CM_OVERRIDE { return "find_library"; }
cmTypeMacro(cmFindLibraryCommand, cmFindBase);
protected: protected:
void AddArchitecturePaths(const char* suffix); void AddArchitecturePaths(const char* suffix);
void AddArchitecturePath(std::string const& dir, void AddArchitecturePath(std::string const& dir,

View File

@@ -60,8 +60,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "find_package"; } std::string GetName() const CM_OVERRIDE { return "find_package"; }
cmTypeMacro(cmFindPackageCommand, cmFindCommon);
private: private:
class PathLabel : public cmFindCommon::PathLabel class PathLabel : public cmFindCommon::PathLabel
{ {

View File

@@ -38,7 +38,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "find_path"; } std::string GetName() const CM_OVERRIDE { return "find_path"; }
cmTypeMacro(cmFindPathCommand, cmFindBase);
bool IncludeFileInPath; bool IncludeFileInPath;
private: private:

View File

@@ -39,8 +39,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "find_program"; } std::string GetName() const CM_OVERRIDE { return "find_program"; }
cmTypeMacro(cmFindProgramCommand, cmFindBase);
private: private:
std::string FindProgram(); std::string FindProgram();
std::string FindNormalProgram(); std::string FindNormalProgram();

View File

@@ -51,8 +51,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "foreach"; } std::string GetName() const CM_OVERRIDE { return "foreach"; }
cmTypeMacro(cmForEachCommand, cmCommand);
private: private:
bool HandleInMode(std::vector<std::string> const& args); bool HandleInMode(std::vector<std::string> const& args);
}; };

View File

@@ -14,12 +14,9 @@ public:
~cmFunctionHelperCommand() CM_OVERRIDE {} ~cmFunctionHelperCommand() CM_OVERRIDE {}
/** /**
* This is used to avoid including this command * This determines if the command is defined in a cmake script.
* in documentation. This is mainly used by
* cmMacroHelperCommand and cmFunctionHelperCommand
* which cannot provide appropriate documentation.
*/ */
bool ShouldAppearInDocumentation() const CM_OVERRIDE { return false; } bool IsUserDefined() const CM_OVERRIDE { return true; }
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
@@ -58,8 +55,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return this->Args[0]; } std::string GetName() const CM_OVERRIDE { return this->Args[0]; }
cmTypeMacro(cmFunctionHelperCommand, cmCommand);
std::vector<std::string> Args; std::vector<std::string> Args;
std::vector<cmListFileFunction> Functions; std::vector<cmListFileFunction> Functions;
cmPolicies::PolicyMap Policies; cmPolicies::PolicyMap Policies;

View File

@@ -46,8 +46,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "function"; } std::string GetName() const CM_OVERRIDE { return "function"; }
cmTypeMacro(cmFunctionCommand, cmCommand);
}; };
#endif #endif

View File

@@ -26,8 +26,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "get_cmake_property"; } std::string GetName() const CM_OVERRIDE { return "get_cmake_property"; }
cmTypeMacro(cmGetCMakePropertyCommand, cmCommand);
}; };
#endif #endif

View File

@@ -27,8 +27,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "get_directory_property"; } std::string GetName() const CM_OVERRIDE { return "get_directory_property"; }
cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand);
private: private:
void StoreResult(const std::string& variable, const char* prop); void StoreResult(const std::string& variable, const char* prop);
}; };

View File

@@ -35,8 +35,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "get_filename_component"; } std::string GetName() const CM_OVERRIDE { return "get_filename_component"; }
cmTypeMacro(cmGetFilenameComponentCommand, cmCommand);
}; };
#endif #endif

View File

@@ -29,8 +29,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "get_property"; } std::string GetName() const CM_OVERRIDE { return "get_property"; }
cmTypeMacro(cmGetPropertyCommand, cmCommand);
private: private:
enum OutType enum OutType
{ {

View File

@@ -24,8 +24,6 @@ public:
{ {
return "get_source_file_property"; return "get_source_file_property";
} }
cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand);
}; };
#endif #endif

View File

@@ -21,8 +21,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "get_target_property"; } std::string GetName() const CM_OVERRIDE { return "get_target_property"; }
cmTypeMacro(cmGetTargetPropertyCommand, cmCommand);
}; };
#endif #endif

View File

@@ -21,8 +21,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "get_test_property"; } std::string GetName() const CM_OVERRIDE { return "get_test_property"; }
cmTypeMacro(cmGetTestPropertyCommand, cmCommand);
}; };
#endif #endif

View File

@@ -66,8 +66,6 @@ public:
// Filter the given variable definition based on policy CMP0054. // Filter the given variable definition based on policy CMP0054.
static const char* GetDefinitionIfUnquoted( static const char* GetDefinitionIfUnquoted(
const cmMakefile* mf, cmExpandedCommandArgument const& argument); const cmMakefile* mf, cmExpandedCommandArgument const& argument);
cmTypeMacro(cmIfCommand, cmCommand);
}; };
#endif #endif

View File

@@ -35,8 +35,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "include"; } std::string GetName() const CM_OVERRIDE { return "include"; }
cmTypeMacro(cmIncludeCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "include_directories"; } std::string GetName() const CM_OVERRIDE { return "include_directories"; }
cmTypeMacro(cmIncludeDirectoryCommand, cmCommand);
protected: protected:
// used internally // used internally
void GetIncludes(const std::string& arg, std::vector<std::string>& incs); void GetIncludes(const std::string& arg, std::vector<std::string>& incs);

View File

@@ -37,8 +37,6 @@ public:
{ {
return "include_external_msproject"; return "include_external_msproject";
} }
cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand);
}; };
#endif #endif

View File

@@ -36,8 +36,6 @@ public:
{ {
return "include_regular_expression"; return "include_regular_expression";
} }
cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "install"; } std::string GetName() const CM_OVERRIDE { return "install"; }
cmTypeMacro(cmInstallCommand, cmCommand);
private: private:
bool HandleScriptMode(std::vector<std::string> const& args); bool HandleScriptMode(std::vector<std::string> const& args);
bool HandleTargetsMode(std::vector<std::string> const& args); bool HandleTargetsMode(std::vector<std::string> const& args);

View File

@@ -40,8 +40,6 @@ public:
void FinalPass() CM_OVERRIDE; void FinalPass() CM_OVERRIDE;
bool HasFinalPass() const CM_OVERRIDE { return !this->IsFilesForm; } bool HasFinalPass() const CM_OVERRIDE { return !this->IsFilesForm; }
cmTypeMacro(cmInstallFilesCommand, cmCommand);
protected: protected:
void CreateInstallGenerator() const; void CreateInstallGenerator() const;
std::string FindInstallSource(const char* name) const; std::string FindInstallSource(const char* name) const;

View File

@@ -41,8 +41,6 @@ public:
bool HasFinalPass() const CM_OVERRIDE { return true; } bool HasFinalPass() const CM_OVERRIDE { return true; }
cmTypeMacro(cmInstallProgramsCommand, cmCommand);
protected: protected:
std::string FindInstallSource(const char* name) const; std::string FindInstallSource(const char* name) const;

View File

@@ -31,8 +31,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "install_targets"; } std::string GetName() const CM_OVERRIDE { return "install_targets"; }
cmTypeMacro(cmInstallTargetsCommand, cmCommand);
}; };
#endif #endif

View File

@@ -33,8 +33,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "link_directories"; } std::string GetName() const CM_OVERRIDE { return "link_directories"; }
cmTypeMacro(cmLinkDirectoriesCommand, cmCommand);
private: private:
void AddLinkDir(std::string const& dir); void AddLinkDir(std::string const& dir);
}; };

View File

@@ -31,8 +31,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "link_libraries"; } std::string GetName() const CM_OVERRIDE { return "link_libraries"; }
cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "list"; } std::string GetName() const CM_OVERRIDE { return "list"; }
cmTypeMacro(cmListCommand, cmCommand);
protected: protected:
bool HandleLengthCommand(std::vector<std::string> const& args); bool HandleLengthCommand(std::vector<std::string> const& args);
bool HandleGetCommand(std::vector<std::string> const& args); bool HandleGetCommand(std::vector<std::string> const& args);

View File

@@ -30,8 +30,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "load_cache"; } std::string GetName() const CM_OVERRIDE { return "load_cache"; }
cmTypeMacro(cmLoadCacheCommand, cmCommand);
protected: protected:
std::set<std::string> VariablesToRead; std::set<std::string> VariablesToRead;
std::string Prefix; std::string Prefix;

View File

@@ -93,8 +93,6 @@ public:
} }
} }
cmTypeMacro(cmLoadedCommand, cmCommand);
cmLoadedCommandInfo info; cmLoadedCommandInfo info;
}; };

View File

@@ -12,7 +12,6 @@ public:
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE; cmExecutionStatus& status) CM_OVERRIDE;
std::string GetName() const CM_OVERRIDE { return "load_command"; } std::string GetName() const CM_OVERRIDE { return "load_command"; }
cmTypeMacro(cmLoadCommandCommand, cmCommand);
}; };
#endif #endif

View File

@@ -15,12 +15,9 @@ public:
~cmMacroHelperCommand() CM_OVERRIDE {} ~cmMacroHelperCommand() CM_OVERRIDE {}
/** /**
* This is used to avoid including this command * This determines if the command is defined in a cmake script.
* in documentation. This is mainly used by
* cmMacroHelperCommand and cmFunctionHelperCommand
* which cannot provide appropriate documentation.
*/ */
bool ShouldAppearInDocumentation() const CM_OVERRIDE { return false; } bool IsUserDefined() const CM_OVERRIDE { return true; }
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
@@ -59,8 +56,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return this->Args[0]; } std::string GetName() const CM_OVERRIDE { return this->Args[0]; }
cmTypeMacro(cmMacroHelperCommand, cmCommand);
std::vector<std::string> Args; std::vector<std::string> Args;
std::vector<cmListFileFunction> Functions; std::vector<cmListFileFunction> Functions;
cmPolicies::PolicyMap Policies; cmPolicies::PolicyMap Policies;

View File

@@ -46,8 +46,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "macro"; } std::string GetName() const CM_OVERRIDE { return "macro"; }
cmTypeMacro(cmMacroCommand, cmCommand);
}; };
#endif #endif

View File

@@ -38,8 +38,6 @@ public:
* This determines if the command is invoked when in script mode. * This determines if the command is invoked when in script mode.
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
}; };
#endif #endif

View File

@@ -37,8 +37,6 @@ public:
* FindUnixMake.cmake used by the CTEST_BUILD command. * FindUnixMake.cmake used by the CTEST_BUILD command.
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
*/ */
std::string GetName() const CM_OVERRIDE { return "math"; } std::string GetName() const CM_OVERRIDE { return "math"; }
cmTypeMacro(cmMathCommand, cmCommand);
protected: protected:
bool HandleExprCommand(std::vector<std::string> const& args); bool HandleExprCommand(std::vector<std::string> const& args);
}; };

View File

@@ -33,8 +33,6 @@ public:
* This determines if the command is invoked when in script mode. * This determines if the command is invoked when in script mode.
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmMessageCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
* This determines if the command is invoked when in script mode. * This determines if the command is invoked when in script mode.
*/ */
bool IsScriptable() const CM_OVERRIDE { return true; } bool IsScriptable() const CM_OVERRIDE { return true; }
cmTypeMacro(cmOptionCommand, cmCommand);
}; };
#endif #endif

View File

@@ -10,7 +10,6 @@ class cmDependInformation;
class cmOutputRequiredFilesCommand : public cmCommand class cmOutputRequiredFilesCommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand);
cmCommand* Clone() CM_OVERRIDE { return new cmOutputRequiredFilesCommand; } cmCommand* Clone() CM_OVERRIDE { return new cmOutputRequiredFilesCommand; }
bool InitialPass(std::vector<std::string> const& args, bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE; cmExecutionStatus& status) CM_OVERRIDE;

View File

@@ -32,8 +32,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "cmake_parse_arguments"; } std::string GetName() const CM_OVERRIDE { return "cmake_parse_arguments"; }
cmTypeMacro(cmParseArgumentsCommand, cmCommand);
}; };
#endif #endif

View File

@@ -32,8 +32,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "project"; } std::string GetName() const CM_OVERRIDE { return "project"; }
cmTypeMacro(cmProjectCommand, cmCommand);
}; };
#endif #endif

View File

@@ -16,8 +16,6 @@
class cmQTWrapCPPCommand : public cmCommand class cmQTWrapCPPCommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmQTWrapCPPCommand, cmCommand);
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */

View File

@@ -15,7 +15,6 @@
class cmQTWrapUICommand : public cmCommand class cmQTWrapUICommand : public cmCommand
{ {
public: public:
cmTypeMacro(cmQTWrapUICommand, cmCommand);
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "remove"; } std::string GetName() const CM_OVERRIDE { return "remove"; }
cmTypeMacro(cmRemoveCommand, cmCommand);
}; };
#endif #endif

View File

@@ -31,8 +31,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "remove_definitions"; } std::string GetName() const CM_OVERRIDE { return "remove_definitions"; }
cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand);
}; };
#endif #endif

View File

@@ -34,8 +34,6 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
std::string GetName() const CM_OVERRIDE { return "return"; } std::string GetName() const CM_OVERRIDE { return "return"; }
cmTypeMacro(cmReturnCommand, cmCommand);
}; };
#endif #endif

Some files were not shown because too many files have changed in this diff Show More