cmake: unify instructions for static and shared library building
CommandLineOptions: fix compilation in static library mode