This MR provides two (actually three) things (yes I know I should have made two (or three?) MRs, but one of them is really small
- one of the CI stages had incorrectly inherited properties from another stage, duplicating work. Specifically when we package, we would try to build a release and weekly package for CentOS 6.
- We've integrated the building/linking of GTest now into the build system. The main reason for doing this is that OS packages for gtest are inconsistently packaged and compiled. Some distributions only packages sources, so one needs to compile it anyway; some distributions package it as a shared-lib, but then we get weird linking problems because of missing flags or lib-dependencies. Integrating these flags for specific systems is a waste of time.
Regarding the GTest integration, we only config/compile it when -DFUNCTESTS=ON
. GTest is retrieved/compiled/linked through CMake's ExternalProject macro - which means all of this process is automated and cached. We also now consistently use the same version of GTest on all systems.
P.s. CMake has nice integration/support for GTest, but exposing most of this means moving to a newer version of CMake. We now only support CMake/CPack/CTest version >=
3.10.