The compiler options did not fit the expectations from the default cmake build types and could not be modified via environment variables. Also some of the used compiler options were gcc specific. The problem came from the fixed assignments to the CMAKE_FLAGS variables.
Replaced the fixed assignments with corresponding add_*_options for compiler and linker options that allow to use, e.g., the CXXFLAGS environment variable, to pass additional options.
Removed (gcc-specific) compiler options for suppression of some warnings
Used cmake generator expressions to add "Release"/"MinSizeRel" specific options
Pass the symbol striping option to the linker instead of to the compiler
The compiler options did not fit the expectations from the default cmake build types and could not be modified via environment variables. Also some of the used compiler options were gcc specific. The problem came from the fixed assignments to the CMAKE_FLAGS variables.