Following [1] to get to this setup.
We setup all the ccache configuration before calling project() because
project will perform compiler checks. This is also why we can't use
message_colored here and print the colors manually
Before ENABLE_CCACHE was not yet defined when we reached the check in
01-core because the option was defined in 02-opts
[1] https://crascit.com/2016/04/09/using-ccache-with-cmake/
Before, because of [ -d "$search" ] || search="$(dirname "$search")",
clang-format.sh would search for files to format in the whole repo
(even in the build directory and the submodules)
This now also looks for source files in the tests folder
I have removed the clang-format from clang-tidy.sh because one may want
to run clang-tidy without reformatting
install_xcb_xrm.sh takes advantage of the travis cache but it doesn't
actually install the libraries on the system when it finds that the
compilation has been cached.
Using brace initialization here causes bar.hpp to not compile when
included on its own, forcing all clients to also include
tray_manager.hpp and so on, which defeats the purpose of forward
declaring those classes.
This also allows us to remove the tray_manager.hpp, renderer.hpp and
parser.hpp includes from the clients of bar.hpp
As mentioned in #1215, gcc >=8 will complain, if strncpy truncates the
source string or gcc can prove there is no NUL terminating byte.
This also updates the i3ipcpp submodule where there was a similar error
Fixes#1215
atoi, atof and so on have undefined behavior if anything goes wrong. We
now use strto*, but without error checking. In most places overflows and
the like *should* not happen. String to number conversions are only used
when reading data from other applications or from the config, if another
application gives unparsable strings or too large numbers, then most
likely there is something wrong with that application. If the error
comes from the user config, then the user has to live with values
provided by strto* on error (which are very reasonable)
Fixes#1201
Makes helping with build issues easier as we readily see what versions
are being used.
Cmake already prints the version but only when run the first time and
not on subsequent calls, so the information is often lost
The PYTHONPATH env variable needed to be removed because it was messing
with pip and cpp-coveralls
Unfortunately adding the '-e build' to coveralls doesn't work to exclude
source files in the build directory, as it won't collect any data then.
If at some point, we have source files that are used by the tests
somewhere inside the build folder that isn't covered by the exclusion
rules, we'll need to add it here