New features
- Add support for including multiple `build.bfg` (and `options.bfg`) files from
subdirectories via `submodule()`
- Create `-uninstalled` variants of generated *pkg-config* `.pc` files and
allow build scripts to use them internally
- Add `opts.gui` to generate graphical programs (important on Windows)
- Add `opts.static` to request static linking of libraries
- MSVC's runtime can now be selected by using a combination of `opts.static`
and `opts.debug`
- MSVC linker now automatically links to default Windows libraries
(`kernel32.lib`, etc)
- Link steps (`executable`, `library`, etc) now accept an `extra_compile_deps`
argument to forward on to the compilation step
- Allow customizing `install` locations for specific files via the `directory`
argument
- Iterables passed to `default` or `install` will include each element of the
iterable in the appropriate build target
- `info()`, `debug()`, and `warning()` now take a variable number of arguments
to print
- `generated_source()` steps are now automatically created as necessary for
files passed to `object_file()`, if possible
- Add `path_exists()` builtin
- Paths with a trailing `/` are now treated as directory paths, and when passed
to `auto_file()` will create a directory object
- Add support for compiling Windows `.rc` files
- Add support for setting the entry point for native binaries (C, C++, etc)
- The default list of excluded globs for `find_files()` can now be customized
via `project(find_exclude=[...])`
- Try to find the right compiler to use for C-family languages by guessing based
on other compilers in the family (e.g. if `CXX=g++`, guess that the C compiler
is `gcc`)
- Add support for `DESTDIR` on Windows when installation paths don't include a
drive letter
- Regenerating build files with the Ninja backend now uses the `console` pool,
allowing realtime output and colored text
Breaking changes
- Drop support for Python 2
- `find_files()` and `find_paths()` have been redesigned to support recursive
globs
- `pkg_config()` now defaults to `auto_fill=False`
- `resource_file()` has been deprecated; use `source_file()` instead
- `show_stack` for `info()` and `debug()` must now be specified as a keyword
argument
- `directory`, and `header_directory` now require uncommon arguments to be
specified as keyword arguments
- Adding to existing environment variables in `env.execute()` and `env.run()`
is now done via `extra_env`, not `env`/`env_update`
Bug fixes
- `copy_file()` now works correctly when copying into a subdirectory on the
Make backend
- `extra_deps` now works with `copy_file()`
- Calling `exit()` with a non-zero return code from a `build.bfg` file now
causes configuration to fail
- Automatically-generated PCH source files (for MSVC compilers) are now placed
in the same directory as the resulting PCH
- The contents of header directories in the build directory are now installed to
the base include directory
- The `install_name` for libraries on macOS is now always an absolute path,
instead of using `rpath`-based paths prior to installation
- MSBuild backend can now build libraries with no source files that link to a
whole-archive library
- Object files with unrecognized source languages can now be linked with the
default linker for their object format
- `.stamp` files generated by the Make backend are now properly removed when
running `make clean`
- Fix `sudo` prompt when installing to a system directory with the Ninja backend
---