1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmLoadCommandCommand_h
13 #define cmLoadCommandCommand_h
15 #include "cmCommand.h"
17 /** \class cmLoadCommandCommand
18 * \brief Load in a Command plugin
20 * cmLoadCommandCommand loads a command into CMake
22 class cmLoadCommandCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmLoadCommandCommand;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * The name of the command as specified in CMakeList.txt.
43 virtual const char* GetName() const {return "load_command";}
46 * Succinct documentation.
48 virtual const char* GetTerseDocumentation() const
50 return "Load a command into a running CMake.";
56 virtual const char* GetFullDocumentation() const
59 " load_command(COMMAND_NAME <loc1> [loc2 ...])\n"
60 "The given locations are searched for a library whose name is "
61 "cmCOMMAND_NAME. If found, it is loaded as a module and the command "
62 "is added to the set of available CMake commands. Usually, "
63 "TRY_COMPILE is used before this command to compile the module. "
64 "If the command is successfully loaded a variable named\n"
65 " CMAKE_LOADED_COMMAND_<COMMAND_NAME>\n"
66 "will be set to the full path of the module that was loaded. "
67 "Otherwise the variable will not be set.";
70 cmTypeMacro(cmLoadCommandCommand, cmCommand);