Fix CMake for cog mode