cmake_command.rst 718 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_command
  2. -------------
  3. Call meta-operations on CMake commands.
  4. Synopsis
  5. ^^^^^^^^
  6. .. parsed-literal::
  7. cmake_command(`INVOKE`_ <command> [<args>...])
  8. Introduction
  9. ^^^^^^^^^^^^
  10. This command will call meta-operations on built-in CMake commands or
  11. those created via the :command:`macro` or :command:`function` commands.
  12. Invoking
  13. ^^^^^^^^
  14. .. _INVOKE:
  15. .. code-block:: cmake
  16. cmake_command(INVOKE <command> [<args>...])
  17. Invokes the named ``<command>`` with the given arguments (if any).
  18. For example, the code:
  19. .. code-block:: cmake
  20. set(message_command "message")
  21. cmake_command(INVOKE ${message_command} STATUS "Hello World!")
  22. is equivalent to
  23. .. code-block:: cmake
  24. message(STATUS "Hello World!")