summaryrefslogtreecommitdiffstats
path: root/Help/command/load_command.rst
blob: 63f23beade16a393a97dd3ab77bc3305b7efe9e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
load_command
------------

Load a command into a running CMake.

::

  load_command(COMMAND_NAME <loc1> [loc2 ...])

The given locations are searched for a library whose name is
cmCOMMAND_NAME.  If found, it is loaded as a module and the command is
added to the set of available CMake commands.  Usually, TRY_COMPILE is
used before this command to compile the module.  If the command is
successfully loaded a variable named

::

  CMAKE_LOADED_COMMAND_<COMMAND_NAME>

will be set to the full path of the module that was loaded.  Otherwise
the variable will not be set.