summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/cross_find.md
blob: b16d64df60192d0f65b4d9105d0cc74eb11c7a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Can override executables in the cross file

The cross file can now be used for overriding the result of
`find_program`. As an example if you want to find the `objdump`
command and have the following definition in your cross file:

    [binaries]
    ...
    objdump = '/usr/bin/arm-linux-gnueabihf-objdump-6'

Then issuing the command `find_program('objdump')` will return the
version specified in the cross file. If you need the build machine's
objdump, you can specify the `native` keyword like this:

    native_objdump = find_program('objdump', native : true)