load_command.rst 569 B

123456789101112131415161718192021
  1. load_command
  2. ------------
  3. Load a command into a running CMake.
  4. ::
  5. load_command(COMMAND_NAME <loc1> [loc2 ...])
  6. The given locations are searched for a library whose name is
  7. cmCOMMAND_NAME. If found, it is loaded as a module and the command is
  8. added to the set of available CMake commands. Usually, TRY_COMPILE is
  9. used before this command to compile the module. If the command is
  10. successfully loaded a variable named
  11. ::
  12. CMAKE_LOADED_COMMAND_<COMMAND_NAME>
  13. will be set to the full path of the module that was loaded. Otherwise
  14. the variable will not be set.