def METHOD_NAME(cfg, fips_dir, project_dir, build_dir, local_build, toolchain_path, defines) :
    """run cmake tool to generate build files
    :param cfg:             a fips config object
    :param project_dir:     absolute path to project (must have root CMakeLists.txt file)
    :param build_dir:       absolute path to build directory (where cmake files are generated)
    :param toolchain:       toolchain path or None
    :returns:               True if cmake returned successful
    """
    write_presets(cfg, fips_dir, project_dir, build_dir, local_build, toolchain_path, defines)
    res = subprocess.call('cmake --preset default', cwd=project_dir, shell=True)
    return res == 0