Commit Graph

44 Commits

Author SHA1 Message Date
Jussi Pakkanen 61a05f26e3 Add option to disable implicit include directories. Closes #2139. 2017-08-05 00:26:13 +03:00
Jussi Pakkanen bff37a90fc Merged buildrpath branch. 2017-07-21 22:19:07 +03:00
Jussi Pakkanen 979efce04a Merge pull request #1955 from jon-turney/exe-implib
Support implibs for executables on Windows
2017-07-21 20:06:46 +03:00
Jussi Pakkanen e82edc179f Check for manual attempts to set rpath and update docs. 2017-07-21 19:40:54 +03:00
Nirbheek Chauhan 26834a6198 Link to compiler properties for compiler ids list
[skip ci]
2017-07-21 11:29:30 +00:00
Nirbheek Chauhan 93d1b2989e Updates to the reference manual
Typos, add details about how subprojects work, document compiler ids.
2017-07-21 10:33:58 +00:00
Jon Turney 8f859a5105 Make the name of the executable implib configurable 2017-07-20 21:11:56 +01:00
Jon Turney 3fa3922cea Support implibs for executables on Windows
Add a boolean 'implib' kwarg to executable().  If true, it is permitted to
use the returned build target object in link_with:

On platforms where this makes sense (e.g. Windows), an implib is generated
for the executable and used when linking.  Otherwise, it has no effect.

(Rather than checking if it is a StaticLibrary or SharedLibary, BuildTarget
subclasses gain the is_linkable_target method to test if they can appear in
link_with:)

Also install any executable implib in a similar way to a shared library
implib, i.e. placing the implib in the appropriate place

Add tests of:
- a shared_module containing a reference to a symbol which is known (at link
time) to be provided by the executable
- trying to link with non-implib executables (should fail)
- installing the implib

(This last one needs a little enhancement of the installed file checking as
this is the first install test we have which needs to work with either
MSVC-style or GCC-style implib filenames)
2017-07-20 21:11:56 +01:00
Alexis Jeandet e1b24765af Removed minor typos in documentation.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-07-17 16:44:51 +02:00
Adam C. Foltzer 69b18cf7e9 rename `crate_type` to `rust_crate_type` per @TingPing 2017-06-14 08:39:41 -07:00
Adam C. Foltzer bdd4c45b17 Enhance Rust support
- Adds a `crate_type` kwarg to library targets, allowing the different
  types of Rust [linkage][1].
- Shared libraries use the `dylib` crate type by default, but can also
  be `cdylib`
- Static libraries use the `rlib` crate type by default, but can also
  be `staticlib`
- If any Rust target has shared library dependencies, add the
  appropriate linker arguments, including rpath for the sysroot of the
  Rust compiler

[1]: https://doc.rust-lang.org/reference/linkage.html
2017-06-09 15:14:02 -07:00
Jan Chren (rindeal) bafc607ab1 Update reference manual and release notes 2017-06-07 23:51:20 +02:00
Bálint Aradi 706b3cafab Add version for configure_file extension in reference manual 2017-06-03 16:51:58 +02:00
Bálint Aradi 28dededf08 Update reference manual and release notes 2017-06-03 16:51:58 +02:00
Chris Mayo 0e9852a457 docs: Fix broken page links 2017-06-03 16:03:04 +03:00
Jussi Pakkanen 189784b474 Merge pull request #1792 from jon-turney/custom_target_vs_module_defs
Allow vs_module_defs to use a custom_target
2017-05-21 21:31:14 +03:00
Jon Turney 75099510f1 docs: The return value of executable() is a builttarget object.
Make executable() consistent with all other functions returning a
buildtarget, it's return type is a buildtarget object.
2017-05-19 18:00:42 +01:00
Jon Turney cad8386733 docs: Document the object returned by custom_target 2017-05-19 18:00:29 +01:00
Jon Turney f12a7f2ad0 docs: Correct list of things that are a build target to include shared_module 2017-05-19 17:01:46 +01:00
Jon Turney 5c7f9797c3 docs: Move "build target object" from "build-in objects" to "returned objects"
Also move "run result" object so objects are sorted alphabetically
2017-05-19 17:01:43 +01:00
Jon Turney 66a6ea984b Allow vs_module_defs to use a custom_target
Allow vs_module_defs to use a custom_target
Add a test and update documentation
2017-05-16 19:56:32 +01:00
Jon Turney e99cfdfbc7 Make vs_module_defs: do something for gcc on Windows as well
Module definition files may be useful when building with gcc on Windows also
(e.g. if the existing build uses them, if exports are aliased, if we were
retro enough to export by ordinal, etc.)

Add the .def file to the link command line when using gcc on Windows

Run the appropriate windows tests irrespective of compiler.
2017-05-12 18:56:43 +03:00
Jussi Pakkanen 1e14438a38 Merge pull request #1735 from dcbaker/list-of-files
Allow passing a list of Files to CustomTarget. Closes #1720
2017-05-12 18:54:46 +03:00
Peter Hutterer 73494c9927 docs: make the required argument for find_program stick out more 2017-05-11 22:39:47 +03:00
Dylan Baker c03744cccb Allow passing a list of Files to CustomTarget. Closes #1720 2017-05-11 09:57:38 -07:00
Dylan Baker e2567386f1 Use flatten for link targets. Fixes #1764 2017-05-11 09:57:38 -07:00
Jussi Pakkanen 1a87c967f1 Merge pull request #1761 from keszybz/docs
Some simple doc fixes
2017-05-11 00:15:58 +03:00
Zbigniew Jędrzejewski-Szmek 65450459de docs: add puncuation to description of compiler object functions 2017-05-09 14:51:01 -04:00
Zbigniew Jędrzejewski-Szmek ed9f79b8a4 docs: mention $DESTDIR in add_install_script description, add punctuation
Although not stricly necessary, it is good to mention $DESTDIR in the
explanation for add_install_script, since it might not be obvious for the
user that it is available.

Also add punctuation to be consistent.

v2:
- fix "witht" typo
- reword $DESTDIR description to say that it is inherited from the environment
- also describe $MESONINTROSPECT
2017-05-09 12:10:35 -04:00
Tim-Philipp Müller df48be051c docs: how to make find_program() search additional directories
Fixes #1702
2017-05-09 09:20:21 +01:00
Zbigniew Jędrzejewski-Szmek 0a8621a9bd docs: add hyperlinks and a short description of unity builds
At first I thought this is something about Ubuntu ;)
2017-05-08 20:12:29 -04:00
Dylan Baker 7053d9abfd 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.
2017-05-08 20:59:46 +02:00
Alberto Aguirre ccab7d64f4 Add support for @CURRENT_SOURCE_DIR@ in generator arguments
Allow users to specify @CURRENT_SOURCE_DIR@ in generator arguments
to specify the current target source directory.
This is useful when creating protobuf generator objects in sub-directories
because protoc will then generate files in the expected location.

Fixes #1622.

Remove stray semicolon

Update documentation
2017-05-08 20:53:57 +02:00
Jon Turney 855715b29e docs: make project(license:) a separate bullet point 2017-05-08 20:08:56 +02:00
Peter Hutterer 7a3be163cb Default to project_version() in vcs_tag fallback 2017-05-05 08:11:28 +10:00
Peter Hutterer 4378655a39 docs: document additional args for vcs_tag
Supported as of 223596d7bf
2017-05-05 08:11:04 +10:00
Peter Hutterer e982d5118e docs: clarify that vcs_tag output can be used as source
"you should put in your main program" is confusing, "that can be used as
source" is slightly better.
2017-05-05 08:11:04 +10:00
Peter Hutterer ca924451ac Use American English: behaviour -> behavior 2017-05-04 22:09:27 +03:00
Dylan Baker 5f1b96a076 docs: Update SharedLibrary vs_module_defs accepts a File object 2017-05-04 00:18:22 +03:00
Elliott Sales de Andrade f9de195d7c doc: Replace kwarg with keyword argument.
This abbreviation is a Python-ism that is not really clear to those out
of the loop.
2017-05-03 16:20:53 -04:00
Elliott Sales de Andrade f3ad633f55 doc: Fix several minor typos. 2017-05-03 16:20:53 -04:00
Elliott Sales de Andrade b80d40c287 doc: Capitalize things more consistently.
Upper or lower case depending on the official spelling, or the more
consistent usage.
2017-05-03 16:20:51 -04:00
Peter Hutterer 71f0a63fb2 docs: fix link to file a new issue 2017-05-03 21:00:36 +10:00
Thibault Saunier b371875e02 docs: Import the website and wiki and build with hotdoc
This allows us to more easily have the documentation in sync with
the source code as people will have to document new features etc
right at the time where they implement it.
2017-04-26 17:56:33 +03:00