diff options
author | Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> | 2016-05-04 17:30:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-09 12:56:27 (GMT) |
commit | 8c2cedc6243b281a0814b284abbcd1c45c42b085 (patch) | |
tree | b4bd057053fff493dc9ed8f9538e5e039faa6e89 /Help | |
parent | eccfc0d185526b746b722ed3d3d1302515698c9e (diff) | |
download | CMake-8c2cedc6243b281a0814b284abbcd1c45c42b085.zip CMake-8c2cedc6243b281a0814b284abbcd1c45c42b085.tar.gz CMake-8c2cedc6243b281a0814b284abbcd1c45c42b085.tar.bz2 |
CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR
Teach the `add_custom_command` and `add_custom_target' commands to
substitute argv0 with the crosscompiling emulator if it is a target with
the `CROSSCOMPILING_EMULATOR` property set.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/add_custom_command.rst | 7 | ||||
-rw-r--r-- | Help/command/add_custom_target.rst | 7 | ||||
-rw-r--r-- | Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst | 7 | ||||
-rw-r--r-- | Help/release/dev/custom-command-CROSSCOMPILING_EMULATOR.rst | 6 |
4 files changed, 20 insertions, 7 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 8726b70..d421364 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -76,9 +76,12 @@ The options are: The optional ``ARGS`` argument is for backward compatibility and will be ignored. - If ``COMMAND`` specifies an executable target (created by the + If ``COMMAND`` specifies an executable target name (created by the :command:`add_executable` command) it will automatically be replaced - by the location of the executable created at build time. + by the location of the executable created at build time. If set, the + :prop_tgt:`CROSSCOMPILING_EMULATOR` executable target property will + also be prepended to the command to allow the executable to run on + the host. (Use the ``TARGET_FILE`` :manual:`generator expression <cmake-generator-expressions(7)>` to reference an executable later in the command line.) diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 82d69db..6980d61 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -58,9 +58,12 @@ The options are: :command:`file(GENERATE)` command to create it, and then specify a ``COMMAND`` to launch it.) - If ``COMMAND`` specifies an executable target (created by the + If ``COMMAND`` specifies an executable target name (created by the :command:`add_executable` command) it will automatically be replaced - by the location of the executable created at build time. + by the location of the executable created at build time. If set, the + :prop_tgt:`CROSSCOMPILING_EMULATOR` executable target property will + also be prepended to the command to allow the executable to run on + the host. Additionally a target-level dependency will be added so that the executable target will be built before this custom target. diff --git a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst b/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst index 3ef8e03..d30a2f2 100644 --- a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst +++ b/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst @@ -1,6 +1,7 @@ CROSSCOMPILING_EMULATOR ----------------------- -Use the given emulator to run executables created when crosscompiling. This -command will be added as a prefix to :command:`add_test` test commands for -built target system executables. +Use the given emulator to run executables created when crosscompiling. +This command will be added as a prefix to :command:`add_test`, +:command:`add_custom_command`, and :command:`add_custom_target` commands +for built target system executables. diff --git a/Help/release/dev/custom-command-CROSSCOMPILING_EMULATOR.rst b/Help/release/dev/custom-command-CROSSCOMPILING_EMULATOR.rst new file mode 100644 index 0000000..390463e --- /dev/null +++ b/Help/release/dev/custom-command-CROSSCOMPILING_EMULATOR.rst @@ -0,0 +1,6 @@ +custom-command-CROSSCOMPILING_EMULATOR +-------------------------------------- + +* The :command:`add_custom_command` and :command:`add_custom_target` commands + learned how to use the :prop_tgt:`CROSSCOMPILING_EMULATOR` executable + target property. |