CMAKE_CROSSCOMPILING_EMULATOR.rst 1.0 KB

1234567891011121314151617181920212223242526
  1. CMAKE_CROSSCOMPILING_EMULATOR
  2. -----------------------------
  3. .. versionadded:: 3.3
  4. This variable is only used when :variable:`CMAKE_CROSSCOMPILING` is on. It
  5. should point to a command on the host system that can run executable built
  6. for the target system.
  7. .. versionadded:: 3.15
  8. If this variable contains a :ref:`semicolon-separated list <CMake Language
  9. Lists>`, then the first value is the command and remaining values are its
  10. arguments.
  11. .. versionadded:: 3.28
  12. This variable can be initialized via an
  13. :envvar:`CMAKE_CROSSCOMPILING_EMULATOR` environment variable.
  14. The command will be used to run :command:`try_run` generated executables,
  15. which avoids manual population of the ``TryRunResults.cmake`` file.
  16. This variable is also used as the default value for the
  17. :prop_tgt:`CROSSCOMPILING_EMULATOR` target property of executables. However,
  18. while :manual:`generator expressions <cmake-generator-expressions(7)>` are
  19. supported by the target property (since CMake 3.29), they are *not* supported
  20. by this variable's :command:`try_run` functionality.