diff options
author | Volker Weißmann <volker.weissmann@gmx.de> | 2021-01-20 12:44:40 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-20 19:07:04 +0000 |
commit | 2e48d13fa2762fd0b3316a76705318be94db8e21 (patch) | |
tree | 6b0d2dd282a27730ada60675813094159cf9baf3 | |
parent | 4d5f6876f9d4b61cefea0036a15576a8fce220a3 (diff) | |
download | meson-2e48d13fa2762fd0b3316a76705318be94db8e21.zip meson-2e48d13fa2762fd0b3316a76705318be94db8e21.tar.gz meson-2e48d13fa2762fd0b3316a76705318be94db8e21.tar.bz2 |
Added "How do I use a library before declaring it?" in the FAQ.
-rw-r--r-- | docs/markdown/FAQ.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/FAQ.md b/docs/markdown/FAQ.md index 4ea4d8d..b0db361 100644 --- a/docs/markdown/FAQ.md +++ b/docs/markdown/FAQ.md @@ -533,3 +533,20 @@ development but are not compiled in release builds. Note that (since Meson 0.57.0) you can set optimization to, say, 2 in your debug builds if you want to. If you tried to set this flag based on optimization level, it would fail in this case. + +## How do I use a library before declaring it? + +This is valid (and good) code: +``` +libA = library('libA', 'fileA.cpp', link_with : []) +libB = library('libB', 'fileB.cpp', link_with : [libA]) +``` +But there is currently no way to get something like this to work: +``` +libB = library('libB', 'fileB.cpp', link_with : [libA]) +libA = library('libA', 'fileA.cpp', link_with : []) +``` +This means that you HAVE to write your `library(...)` calls in the order that the +dependencies flow. While ideas to make arbitrary orders possible exist, they were +rejected because reordering the `library(...)` calls was considered the "proper" +way. See [here](https://github.com/mesonbuild/meson/issues/8178) for the discussion.
\ No newline at end of file |