def METHOD_NAME(cmake_files, executable_pattern) :
    global build_sub_dir
    run_files = []
    if len (cmake_files) == 0:
        return [1, []]
    has_error = False
    base_dir = os.getcwd()
    build_dir = os.path.join(base_dir, build_sub_dir)
    os.makedirs(name=build_dir, exist_ok=True)
    cmake_args = os.getenv("EXTRA_CMAKE_ARGS")
    parallel_build = os.getenv("PARALLEL_BUILD")
    for cmake_file in cmake_files :
        source_dir = os.path.dirname(cmake_file)
        module_build_dir = os.path.join(build_dir, source_dir)
        os.makedirs(name=module_build_dir, exist_ok=True)
        os.chdir(module_build_dir)
        cmake_command = ['cmake']
        if cmake_args is not None:
            cmake_command.append(cmake_args)
        cmake_command.append(os.path.join(base_dir, source_dir))
        if sys.platform == "win32":
            cmake_command.append('-DBIN_SUB_DIR=/Debug') 
        result_code = subprocess.call(cmake_command, shell=False)
        if result_code != 0 :
            print(f"Error with cmake for {source_dir}")
            has_error = True
            continue
        if parallel_build is not None:
            print("building parallel")
            result_code = subprocess.call(['cmake', '--build', '.',  '--parallel', f'{parallel_build}'], shell=False)
        else:
            result_code = subprocess.call(['cmake', '--build', '.'], shell=False)
        if result_code != 0 :
            has_error = True
            continue
        for executable in executable_pattern :
            run_files.extend(glob.glob(f"{module_build_dir}{executable}"))
    if has_error:
        return [1, []]
    else:
        return [0, run_files]