modified CMake functional