make code compiling with cmake