Cleanup Cmake: remove some double compilation
Harmonize some cmake code to avoid double compilation, notably around polar and smallblock. In develop, we just add their sources to other targets, whereas now we define STATIC libraries (further changed to shared library in !3856) to avoid double compilation.
With this command line:
cmake .. -GNinja -DENABLE_TESTS=ON && ninja
shows that before we compile 12631 files, where after it is 12583
there is additional supporting cleanup (move code, remove headers, types, ...).
there is more harmonization to do, I limited myself to some easy wins. For instance, we do the same with PDCP/SDAP, and this should be refactored into STATIC libraries as well.
Edited by Robert Schmidt