From 72a6683c6f564afa8f8d7e96b0238961aa867f00 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 19 Aug 2017 19:47:51 +0300 Subject: Permit overriding find_program from the cross file. --- docs/markdown/snippets/cross_find.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/cross_find.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/cross_find.md b/docs/markdown/snippets/cross_find.md new file mode 100644 index 0000000..b16d64d --- /dev/null +++ b/docs/markdown/snippets/cross_find.md @@ -0,0 +1,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) -- cgit v1.1