From 7053d9abfdef64c1f507173609fad4c9866441eb Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 19 Apr 2017 15:32:24 -0700 Subject: Allow link_depends to take strings, Files or generated objects. Closes #1172 Currently only strings can be passed to the link_depends argument of executable and *library, which solves many cases, but not every one. This patch allows generated sources and Files to be passed as well. On the implementation side, it uses a helper method to keep the more complex logic separated from the __init__ method. This also requires that Targets set their link_depends paths as Files, and the backend is responsible for converting to strings when it wants them. This adds tests for the following cases: - Using a file in a subdir - Using a configure_file as an input - Using a custom_target as an input It does not support using a generator as an input, since currently that would require calling the generator twice, once for the -Wl argument, and once for the link_depends. Also updates the docs. --- docs/markdown/Reference-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/markdown') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 276c9c9..00a891b 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -233,7 +233,7 @@ Executable supports the following keyword arguments. Note that just like the pos - `_pch` precompiled header file to use for the given language - `_args` compiler flags to use for the given language; eg: `cpp_args` for C++ - `link_args` flags to use during linking. You can use UNIX-style flags here for all platforms. -- `link_depends` an extra file in the source tree that the link step depends on such as a symbol visibility map. The purpose is to automatically trigger a re-link (but not a re-compile) of the target when this file changes. +- `link_depends` strings, files, or custom targets the link step depends on such as a symbol visibility map. The purpose is to automatically trigger a re-link (but not a re-compile) of the target when this file changes. - `include_directories` one or more objects created with the `include_directories` function - `dependencies` one or more objects created with [`dependency`](#dependency) or [`find_library`](#compiler-object) (for external deps) or [`declare_dependency`](#declare_dependency) (for deps built by the project) - `gui_app` when set to true flags this target as a GUI application on platforms where this makes a difference (e.g. Windows) -- cgit v1.1