summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-01 12:32:52 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-07 14:24:05 (GMT)
commitd2d43986e7f5013465473a71c393fc3897cecbac (patch)
treed758f2e9f01966a5f9229661be54f97db21b936f /Source/cmLoadCommandCommand.h
parent21f5fc12ee4ca043838264962fc7608a97b8f35f (diff)
downloadCMake-d2d43986e7f5013465473a71c393fc3897cecbac.zip
CMake-d2d43986e7f5013465473a71c393fc3897cecbac.tar.gz
CMake-d2d43986e7f5013465473a71c393fc3897cecbac.tar.bz2
load_command: Deprecate and document pending removal
This command works only when building projects using the same architecture as the running CMake binary. Since it was introduced CMake has learned macro() and function() to add commands, and the execute_process() command to launch advanced external computations. Add a RunCMake.load_command test to verify the warning appears.
Diffstat (limited to 'Source/cmLoadCommandCommand.h')
-rw-r--r--Source/cmLoadCommandCommand.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h
index f0b34ee..bcd1831 100644
--- a/Source/cmLoadCommandCommand.h
+++ b/Source/cmLoadCommandCommand.h
@@ -47,7 +47,7 @@ public:
*/
virtual const char* GetTerseDocumentation() const
{
- return "Load a command into a running CMake.";
+ return "Deprecated. Use macro() or function() instead.";
}
/**
@@ -56,6 +56,13 @@ public:
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 "
@@ -67,6 +74,12 @@ public:
"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);
};