mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Add 'const' qualifier to some cmCommand members
Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
This commit is contained in:
committed by
Brad King
parent
261491fe17
commit
737c49a357
@@ -39,17 +39,17 @@ public:
|
||||
/**
|
||||
* This determines if the command is invoked when in script mode.
|
||||
*/
|
||||
virtual bool IsScriptable() { return true; }
|
||||
virtual bool IsScriptable() const { return true; }
|
||||
|
||||
/**
|
||||
* The name of the command as specified in CMakeList.txt.
|
||||
*/
|
||||
virtual const char* GetName() { return "write_file";}
|
||||
virtual const char* GetName() const { return "write_file";}
|
||||
|
||||
/**
|
||||
* Succinct documentation.
|
||||
*/
|
||||
virtual const char* GetTerseDocumentation()
|
||||
virtual const char* GetTerseDocumentation() const
|
||||
{
|
||||
return "Deprecated. Use the file(WRITE ) command instead.";
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
/**
|
||||
* More documentation.
|
||||
*/
|
||||
virtual const char* GetFullDocumentation()
|
||||
virtual const char* GetFullDocumentation() const
|
||||
{
|
||||
return
|
||||
" write_file(filename \"message to write\"... [APPEND])\n"
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
}
|
||||
|
||||
/** This command is kept for compatibility with older CMake versions. */
|
||||
virtual bool IsDiscouraged()
|
||||
virtual bool IsDiscouraged() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user