Add test build of public headers (again)
With the modernization of the CMake configturation (!986 (merged)) we lost the test build of all public headers (!592 (merged)).
This MR restores the features introduced with !592 (merged) and fixes the compilation of some of the headers.
Note: includes !1393 (merged)
Edited by Marco Clemencic