load_command.rst 630 B

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