The default version is so outdated that it needs to rebuild many
dependencies. Now we bump it to the latest version so that it can use
prebuilt packages.
The `homebrew: update: true` directive updates the whole macOS env which
is unnecessary and increases build time excessively. This commit reverts
back to the old way.
Also the pre-installed cmake & pkg-config version is sufficient so no need
to outdate them.
* Remove cmake installation, it is already pre-installed by TravisCI.
* Limit ccache cache size to 512 MB. Previously the size was 5 GB for
macOS and it took 1~3 mins just for packing & uploading the cache,
limiting the size should shorten total build time.
Remove workarounds for CXXFLAGS.
Using 3 compilation jobs should cause process trashing, tune it down to 2.
TravisCI container builds is deprecated, so remove the `sudo: false` command.
Newer compilers have C++14 mode as default and package maintainers tend
to not specifying a C++ version when building a package, this causes
compatibility issues when (for example) qbt is compiled in C++11 and
dependency lib is in C++14. See issue #9485.
What this commit does:
1. Checks if compiler supports at least C++11
2. Checks if compiler is set in at least C++11 mode
1. Use FeatureSummary module to show configuration results.
2. Invert option()/find_package() relationship: instead of
calling find_package(... REQUIRED) when option is set, rely on optional
find package call and PackageName_FOUND variable.
3. Refactor handling options that result in simple preprocessor defines
(actually copy the snippet from libtorrent) so that everything is done
in a single function call.
4. Populate target properties in order to get rid of
include_directories() calls.
GCC 4.8.4 has a bug with system includes: it does not ignore warnings
for files from system include directories. This breaks our Travis builds
due to warnings in zlib.h.
make does not show compiler command line when -Werror triggers a
compilation error. Ninja does show complete command line in this case,
and the command line might be important for analysing a build error.
Additionally, final build log contains only lines for generated files
and files with compilation warnings, and is much shorter as such.