simplify CMake logic