cmake/Help/command/load_command.rst

24 lines
648 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
load_command
------------
2019-11-11 23:01:05 +01:00
Disallowed since version 3.0. See CMake Policy :policy:`CMP0031`.
2014-08-03 19:52:23 +02:00
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
2015-11-17 17:22:37 +01:00
added to the set of available CMake commands. Usually,
:command:`try_compile` is used before this command to compile the
module. If the command is successfully loaded a variable named
2014-08-03 19:52:23 +02:00
::
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.