Fix cmakeparam logic