How to limit C_FLAGS to certain libraries

Use target properties (Mainly target COMPILE_OPTIONS).

Properties can also be set at directory level (see directory COMPILE_OPTIONS).