ENH: Patch from Alex to add IsDiscouraged method for future use in generating separate documentation for old commands. Also modified documentation of MAKE_DIRECTORY and REMOVE commands to indicate they should not be used.
This commit is contained in:
parent
2b33498c03
commit
f12742d6cd
@ -72,6 +72,12 @@ public:
|
|||||||
"CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.";
|
"CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmBuildNameCommand, cmCommand);
|
cmTypeMacro(cmBuildNameCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,6 +101,15 @@ 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()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
|
@ -88,6 +88,12 @@ public:
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmExecProgramCommand, cmCommand);
|
cmTypeMacro(cmExecProgramCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,6 +94,12 @@ public:
|
|||||||
"is stored in the variable CMAKE_INSTALL_PREFIX.";
|
"is stored in the variable CMAKE_INSTALL_PREFIX.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmInstallFilesCommand, cmCommand);
|
cmTypeMacro(cmInstallFilesCommand, cmCommand);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -90,6 +90,12 @@ public:
|
|||||||
"is stored in the variable CMAKE_INSTALL_PREFIX.";
|
"is stored in the variable CMAKE_INSTALL_PREFIX.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmInstallProgramsCommand, cmCommand);
|
cmTypeMacro(cmInstallProgramsCommand, cmCommand);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -72,6 +72,12 @@ public:
|
|||||||
"(Windows DLL), the files will be copied to that directory.";
|
"(Windows DLL), the files will be copied to that directory.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmInstallTargetsCommand, cmCommand);
|
cmTypeMacro(cmInstallTargetsCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,6 +75,12 @@ public:
|
|||||||
"type of build.";
|
"type of build.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
|
cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Create a directory on the file system.";
|
return "Old directory creation command. Use the FILE command.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,12 +69,21 @@ public:
|
|||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
"This command has been superceded by the FILE(MAKE_DIRECTORY ...) "
|
||||||
|
"command. "
|
||||||
|
"It is provided for compatibility with older CMake code.\n"
|
||||||
" MAKE_DIRECTORY(directory)\n"
|
" MAKE_DIRECTORY(directory)\n"
|
||||||
"Creates the specified directory. Full paths should be given. Any "
|
"Creates the specified directory. Full paths should be given. Any "
|
||||||
"parent directories that do not exist will also be created. Use with "
|
"parent directories that do not exist will also be created. Use with "
|
||||||
"care.";
|
"care.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
|
cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Remove a value from a list in a variable.";
|
return "Old list item removal command. Use the LIST command.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,12 +65,20 @@ public:
|
|||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
"This command has been superceded by the LIST(REMOVE ...) command. "
|
||||||
|
"It is provided for compatibility with older CMake code.\n"
|
||||||
" REMOVE(VAR VALUE VALUE ...)\n"
|
" REMOVE(VAR VALUE VALUE ...)\n"
|
||||||
"Removes VALUE from the variable VAR. "
|
"Removes VALUE from the variable VAR. "
|
||||||
"This is typically used to remove entries from a vector "
|
"This is typically used to remove entries from a vector "
|
||||||
"(e.g. semicolon separated list). VALUE is expanded.";
|
"(e.g. semicolon separated list). VALUE is expanded.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmRemoveCommand, cmCommand);
|
cmTypeMacro(cmRemoveCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,6 +80,12 @@ public:
|
|||||||
"top level project or be built each time make is run from the top.";
|
"top level project or be built each time make is run from the top.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmSubdirCommand, cmCommand);
|
cmTypeMacro(cmSubdirCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,6 +67,12 @@ public:
|
|||||||
"parallel builds correctly. This functionality is now automatic.";
|
"parallel builds correctly. This functionality is now automatic.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmSubdirDependsCommand, cmCommand);
|
cmTypeMacro(cmSubdirDependsCommand, cmCommand);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,6 +75,12 @@ public:
|
|||||||
"C++ code.";
|
"C++ code.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cmTypeMacro(cmVTKMakeInstantiatorCommand, cmCommand);
|
cmTypeMacro(cmVTKMakeInstantiatorCommand, cmCommand);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -77,6 +77,12 @@ public:
|
|||||||
"Create Java wrappers for VTK classes.";
|
"Create Java wrappers for VTK classes.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<cmSourceFile> WrapClasses;
|
std::vector<cmSourceFile> WrapClasses;
|
||||||
std::vector<std::string> WrapHeaders;
|
std::vector<std::string> WrapHeaders;
|
||||||
|
@ -77,6 +77,12 @@ public:
|
|||||||
"Create Python wrappers for VTK classes.";
|
"Create Python wrappers for VTK classes.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper methods
|
* Helper methods
|
||||||
*/
|
*/
|
||||||
|
@ -79,6 +79,12 @@ public:
|
|||||||
"Create Tcl wrappers for VTK classes.";
|
"Create Tcl wrappers for VTK classes.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This command is only kept for compatibility with older CMake versions. */
|
||||||
|
virtual bool IsDiscouraged()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper methods
|
* Helper methods
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user