Commit Graph

5 Commits

Author SHA1 Message Date
Brad King
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
Evaluate generator expressions in these properties, as they apply to
`add_test`, `add_custom_command`, and `add_custom_target`.

The `CMAKE_CROSSCOMPILING_EMULATOR` variable's `try_run` behavior occurs
at configure time and so cannot support generator expressions.
2024-01-29 10:30:24 -05:00
Brad King
2b5447d4a8 Tests: Shorten RunCMake.CrosscompilingEmulator executable names
Also switch to pure C.
2024-01-27 09:57:48 -05:00
Marek Antoniak
bf6f5467a0 Fix allocation in CROSSCOMPILING_EMULATOR evaluation
In commit fec441ec17 (Teach CROSSCOMPILING_EMULATOR to support
arguments, 2019-05-30, v3.15.0-rc1~6^2) the new member
`cmCustomCommandGenerator::EmulatorsWithArguments` was not initialized
to the proper size.  Fix this and add a test case covering the crash
that could occur with multiple commands where an emulator appears only
in a later command.

Fixes: #19500
Co-Author: Brad King <brad.king@kitware.com>
2019-07-23 08:33:31 -04:00
Brad King
f648b9be63 Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets 2016-10-28 15:08:08 -04:00
Jean-Christophe Fillion-Robin
8c2cedc624 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.
2016-05-09 08:56:27 -04:00