As it turns out, CMAKE_BUILD_TYPE has a huge impact on compile speed:
Note how RelWithDebInfo (the default) is the slowest of the bunch, by far.RelWithDebInfo
Elapsed time: 03:09.
Release
Elapsed time: 02:21.
None
Elapsed time: 01:43.
Debug
Elapsed time: 01:58.
g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I propose that travis-ci and Coverity CI should run with -DCMAKE_BUILD_TYPE=None so that CI completes faster. The same might apply to Appveyor (AceSWE, can you comment on that?).