Commit Graph

750 Commits

Author SHA1 Message Date
Federico Pellegrin 557139ecda eclipse: remove repeated entries in include paths for C/C++
Make sure just unique include paths (both system and local) are
added to prevent overcrowding with useless redundant include paths
that grow up a lot the generated XML file and make the usage of
the GUI messy.
The filter was already there for Java/Python.
2021-09-03 10:18:24 +02:00
Federico Pellegrin 161be6e647 eclipse: add generation of editor language settings
Add automatic generation of editor language settings for C and C++,
so the automatic code correction uses the correct compiler and
compiler flags, including for example the correct C/C++ standard
so construct from such standards are correctly managed by the IDE.
Correct compiler and flags are automatically generated using the
build environment data gathered during configure phase.
The playground example has been modified to contain some code that
is standard specific to demonstrate the new feature when run under
Eclipse.
2021-08-31 10:40:10 +02:00
Federico Giovanardi 23df45272c Make clang_compilation_database compatible with variants
In the current implementation if a project is using
build variants it's not possible to use the clang_compilation_database
plugin because it strips the variant information from the build object.
2021-07-15 10:57:23 +02:00
Erik Parker e65bd769f3 color_gcc: Check that cmd has elements in it before processing it. 2021-06-21 13:48:05 -05:00
Federico Pellegrin 47778d9c8f swig: skip CR (\r) if present in module name
Handles presence of \r in module name (ie. DOS mode swig .i files)
Should fix #2350
2021-04-29 04:33:07 +02:00
Michael Vincent b3663173b5 gccdeps: Refactor cache lock
Rework how gccdeps' cached_nodes lock is used so acquiring the lock is
only necessary on a cache miss. Also use a "with" context manager to
simplify management of the lock lifecycle.

Ported from 8b5a2a2086
2021-04-22 12:53:59 +02:00
Michael Vincent c52efadbe6 gccdeps: Move scan() method
Move the scan() method down in the file to match msvcdeps' method
ordering. This makes it easier to compare gccdeps.py and msvcdeps.py
to keep them in sync.
2021-04-22 12:50:22 +02:00
Michael Vincent 412b5c3e49 gccdeps: Rename some variables
Rename some local variables to clarify their purpose and to align with
msvcdeps.py.
2021-04-22 12:49:17 +02:00
Michael Vincent 0bc85fb681 msvcdeps: Align with gccdeps
Just a few small changes to make msvcdeps.py align with gccdeps.py
better.
2021-04-22 12:48:25 +02:00
Michael Vincent 99820803b9 msvcdeps: Remove unused variable 2021-04-22 12:42:21 +02:00
Thomas Nagy c082c5c668 Let msvcsdeps process relative paths and in a deterministic manner 2021-04-22 02:19:25 +02:00
Michael Vincent 2d14817f1f msvcdeps: Faster case correction
Visual Studio returns paths to dependencies with incorrect case.
ant_glob() is very slow for this use case (40~50% impact to overall
build time). This patch uses os.listdir() to find the correct case
of each path component.
2021-04-20 13:38:46 -05:00
Erik Parker 8fecd438f3 msvs: Update project sorting in visual studio solution file
In order to correctly set a default project in visual studio any folders
must be listed at the top of the solution file. This change ensures that
any folders included in generated solutions sort to the top of the .sln
file. The default project, if one exists, will be located after the
folders. Note that it should also be correct to place the default
at the top of the file, followed by any folders.
2021-03-12 13:00:38 -06:00
Thomas Nagy f95264563e Add more docs to clang_compilation_database 2021-01-19 17:49:54 +01:00
Thomas Nagy 99a041cb36 Increase clang_compilation_database and swig compatibility 2021-01-13 17:39:52 +01:00
Thomas Nagy 0c31d99614 Suppress cache trimming operation errors 2021-01-12 18:16:57 +01:00
Federico Pellegrin 1619c2f0fa wafcache: fix reporting of concurrent trim error
As this is run in the non-waf process we don't have Logs, so we
write to stderr instead or we will get a NameError name 'Logs' is
not defined.
2021-01-11 11:18:48 +01:00
Federico Pellegrin 5dbae3b012 wafcache: fix small typo on stats log message 2021-01-07 04:09:11 +01:00
ita1024 3e92585541 Merge branch 'wafcache_stats' into 'master'
wafcache: add simple cache statistics collection, configurable via env

See merge request ita1024/waf!2309
2020-12-26 19:24:33 +00:00
Federico Pellegrin 08c2ca49e0 wafcache: add simple cache statistics collection, configurable via env 2020-12-24 04:20:38 +01:00
Andrew Brodko 329cd106bc Haxe support 2020-12-23 21:40:34 +01:00
Thomas Nagy 307202417c Improve clang_compilation_database interaction with wafcache 2020-12-16 11:08:11 +01:00
Thomas Nagy abfd2f6c76 Reduce wafcache verbosity on cleanup operations 2020-12-16 11:08:03 +01:00
Thomas Nagy 5cddf4b06c Conceal wafcache decoding errors in Python3 2020-12-16 11:07:55 +01:00
Thomas Nagy 7b25a04c97 Exclude wafcache symlink handling
- Exclude classes having folder or symlinks
- Exclude well-known Task classes from wafcache processing
- Remove stale 'waflib.Task.Task.chmod' processing
2020-12-09 08:24:03 +01:00
Thomas Nagy ce770a924a Improve the WAFCACHE_CMD description 2020-11-08 20:04:27 +01:00
Thomas Nagy 3083f83eb5 Improve WAFCACHE_CMD parameter handling 2020-11-03 22:41:37 +01:00
Federico Pellegrin 1322f448a6 wafcache: make the extra more configurable for cloud providers usage 2020-11-03 20:55:47 +00:00
Federico Pellegrin db81b7d508 wafcache: add support for MinIO/mc cache
Add support for MinIO object storage (https://min.io/) using the
MinIO client (https://github.com/minio/mc) to wafcache.

MinIO is an open-source, self-hostable, S3 compatible cache. The
MinIO client supports MinIO connections as well as normal S3/GCS
storages by configuring aliases beforehand.

Hint: some distributions have `mc` (the GNU Midnight Commander)
installed which is not the minio client, be aware of this (or your
build may get stuck with waf waiting for `mc` to never finish)
2020-11-02 07:14:50 +01:00
Thomas Nagy 8722191e44 Fix playground/pch's second example 2020-08-10 21:16:06 +02:00
Thomas Nagy 49a9845639 Port file_to_obj to Python3 2020-08-03 23:31:18 +02:00
Thomas Nagy 1c1204a739 Improve wafcache process pre-allocation 2020-08-03 23:21:36 +02:00
Thomas Nagy a01652d3c2 Conceal gccdeps/msvcdeps errors on inaccessible/unreadable files 2020-06-25 00:55:46 +02:00
Thomas Nagy 8b6786623d gccdeps/msvcdeps: renaming a header must rebuild silently #2293 2020-06-20 00:45:10 +02:00
Thomas Nagy 8537c0de4a Update c_dumbpreproc (broken) 2020-06-18 21:15:46 +02:00
Andreu Montiel 1e1818c06b Allow parameter "always" in doxygen tool (waflib/extra/doxygen.py) 2020-06-13 16:45:18 +02:00
Johan Pauwels 058552063c Escape quoted strings in Xcode project 2020-05-18 13:15:11 +01:00
Johan Pauwels 0d5f11ca29 Export preprocessor macros in Xcode project 2020-05-18 13:13:51 +01:00
Johan Pauwels 44cd7ff57d Fix configuration of linker flags in Xcode file 2020-05-18 13:12:48 +01:00
Johan Pauwels bb86b2c15b Fix alignment in generated Xcode file 2020-05-18 13:09:40 +01:00
ita1024 3ce7da0976 Merge branch 'sphynx_install' into 'master'
sphinx: fix installation phase (as generated files are unknown until build)

See merge request ita1024/waf!2289
2020-05-15 15:31:27 +00:00
Johan Pauwels aafc0364fc Xcode6 py3 fix.
The return type of .keys() in Python 3 is no longer a list, but a 
'dict_keys', which does not support the '+' operator.
2020-05-14 20:26:43 +00:00
Federico Pellegrin def556acd6 sphinx: fix installation phase (as generated files are unknown until build) 2020-05-06 13:50:26 +02:00
Michael Vincent f414602722 msvcdeps: Tweak debug output
Print out which source file waf is gathering dependencies for and leave
the leading spaces in the dependency debug output because it can be
helpful to see the dependency hierarchy.
2020-04-22 19:12:13 -05:00
Mathieu Courtois cef110adc2 boost: ignore version number from library name 2020-04-10 09:34:26 +02:00
Mathieu Courtois d2bd00ec5a boost: fix removal of lib extension 2020-04-09 15:58:05 +02:00
Michael Vincent 44bb31da96 gccdeps: Add support for gas
Add support for generating and using gcc's native dependency files with
the GNU Assembler in addition to the existing C/C++ support.

When the gas and gccdeps tools are loaded, the configure step will test
whether gcc operating on an assembly file supports the -MMD argument.
If so, waf will pass the -MMD argument to .S files assembled with gcc
which will cause it to generate .d dependency files. Waf will then parse
those files for dependency information.

Note: This will only work for assembly files compiled through the gcc
frontend, not with GNU as directly. It also requires assembly files to
use the uppercase .S file extension.
2020-02-24 11:28:45 -06:00
Federico Pellegrin 69e1290b40 doxygen: add ext_int to force build ordering 2020-02-17 11:44:14 +01:00
Federico Pellegrin f7962c5edc javatest: add dependency management for jar/java taskgens 2020-01-04 10:17:40 +01:00
Morten V. Pedersen 6467070a1f Using suggested self.cmd.startswith approach 2020-01-02 14:47:39 +01:00