[cmake-developers] A CMAKE_EMULATOR variable

Matt McCormick matt.mccormick at kitware.com
Wed Mar 4 20:15:13 EST 2015


On Wed, Mar 4, 2015 at 12:00 PM, Brad King <brad.king at kitware.com> wrote:

> However,
> I do not think a global setting like this makes sense.  We cannot
> unconditionally add the cross-compiling target launcher in front of
> all tests.  Some tests may be running host tools.  See below.

This set of patches does not globally and unconditionally add a
launcher in front of all tests. It uses build system knowledge to add
the emulator commands in front of target executables only. Test with
host executables run with the host command. This is why it is
advantageous to use the emulator in this way.


> On 03/04/2015 11:40 AM, Florent Castelli wrote:
>> not just about an emulator but a wrapper
>
> Wrapping or launching almost always has to be configurable on a
> per-test basis.  Any kind of global setting will always need a local
> setting to override it.  That raises the question of which one should
> take precedence.  There are too many possible semantics here for
> "standard" wrapper interfaces to be defined cleanly IMO.

Wrappers are difficult and take tweaking, but wrappers are a diversion
here -- this is intended to be used with emulators or programs that
act very close to emulators.  It has been shown to work with ITK, a
very large and complex project, and with a number of diverse
cross-compiling toolchains and targets.  No per-test tweaks were made
in ITK's over 2500 tests.


The point about the overloaded meaning of "targets" is a good one.  I
think the best name is then CMAKE_CROSSCOMPILING_EMULATOR.


Thanks,
Matt


More information about the cmake-developers mailing list