summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLoadCommandCommand.h')
-rw-r--r--Source/cmLoadCommandCommand.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h
index db18428..bcd1831 100644
--- a/Source/cmLoadCommandCommand.h
+++ b/Source/cmLoadCommandCommand.h
@@ -25,7 +25,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
- virtual cmCommand* Clone()
+ virtual cmCommand* Clone()
{
return new cmLoadCommandCommand;
}
@@ -40,22 +40,29 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
- virtual const char* GetName() {return "load_command";}
-
+ virtual const char* GetName() const {return "load_command";}
+
/**
* Succinct documentation.
*/
- virtual const char* GetTerseDocumentation()
+ virtual const char* GetTerseDocumentation() const
{
- return "Load a command into a running CMake.";
+ return "Deprecated. Use macro() or function() instead.";
}
-
+
/**
* More documentation.
*/
- virtual const char* GetFullDocumentation()
+ virtual const char* GetFullDocumentation() const
{
return
+ "This command will be removed in CMake 3.0. "
+ "It works only when the target architecture matches the "
+ "running CMake binary. "
+ "Use macro() or function() to add commands. "
+ "Use execute_process() to run advanced computations "
+ "in external processes."
+ "\n"
" load_command(COMMAND_NAME <loc1> [loc2 ...])\n"
"The given locations are searched for a library whose name is "
"cmCOMMAND_NAME. If found, it is loaded as a module and the command "
@@ -66,7 +73,13 @@ public:
"will be set to the full path of the module that was loaded. "
"Otherwise the variable will not be set.";
}
-
+
+ /** This command is kept for compatibility with older CMake versions. */
+ virtual bool IsDiscouraged() const
+ {
+ return true;
+ }
+
cmTypeMacro(cmLoadCommandCommand, cmCommand);
};