cmake was trying to link -loptimized