Ejemplo n.º 1
0
def run_fetch(args: Namespace, output=sys.stdout):
    """Run the fetch command."""
    if args.force:
        clean(fetch=True)

    dependency_list = DependencyList()
    dependency_list.create_dependencies(args.path)
    dependency_list.create_subdependencies()
    dependency_list.fetch(output)
    dependency_list.check(output)

    output.write("Done\n")
Ejemplo n.º 2
0
def run_build(args: Namespace, output=sys.stdout):
    """Run the build command."""
    if args.force:
        clean(fetch=True, build=True)

    dependency_list = DependencyList(args.install_path)
    dependency_list.create_dependencies(args.path)
    dependency_list.create_subdependencies()
    dependency_list.fetch(output)
    dependency_list.check(output)
    dependency_list.build(args.rest, output)

    output.write("Done\n")
Ejemplo n.º 3
0
def run_install(args: Namespace, output=sys.stdout):
    """Run the install command."""
    if args.force:
        clean(fetch=True, build=True, install=True)

    dependency_list = DependencyList(args.install_path)
    dependency_list.create_dependencies(args.path)
    dependency_list.create_subdependencies()
    dependency_list.fetch(output)
    dependency_list.check(output)
    dependency_list.build(args.rest, output)
    dependency_list.install(output)

    output.write("Done\n\n")

    output.write(
        "You can now call CMake with "
        f"{CMAKE_PREFIX_PATH.format(dependency_list.get_install_path())}\n")