def METHOD_NAME(ctx, install_prefix=None, python_runtimes='3', cmake_options='', arch="x64"):
    dev_path = get_dev_path()
    if cmake_options.find("-G") == -1:
        cmake_options += " -G \"Unix Makefiles\""
    cmake_args = cmake_options + f" -DBUILD_DEMO:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH={install_prefix or dev_path}"
    python_runtimes = python_runtimes.split(',')
    settings = {
        "DISABLE_PYTHON2:BOOL": "OFF",
        "DISABLE_PYTHON3:BOOL": "OFF",
    }
    if '2' not in python_runtimes:
        settings["DISABLE_PYTHON2:BOOL"] = "ON"
    if '3' not in python_runtimes:
        settings["DISABLE_PYTHON3:BOOL"] = "ON"
    rtloader_build_path = get_rtloader_build_path()
    # clear cmake cache if settings have changed since the last build
    clear_cmake_cache(rtloader_build_path, settings)
    for option, value in settings.items():
        cmake_args += f" -D{option}={value} "
    if arch == "x86":
        cmake_args += " -DARCH_I386=ON"
    if sys.platform == 'darwin':
        cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
    # Perform "out of the source build" in `rtloader_build_path` folder.
    try:
        os.makedirs(rtloader_build_path)
    except OSError as e:
        if e.errno == errno.EEXIST:
            pass
        else:
            raise
    ctx.run(f"cd {rtloader_build_path} && cmake {cmake_args} {get_rtloader_path()}")
    run_make_command(ctx)