コード例 #1
0
def execute(argv):
    project_loader = ProjectLoader()
    cmakelists_builder = CMakeListsBuilder()
    project_builder = ProjectCommands()
    service = CompilationService(project_loader, cmakelists_builder,
                                 project_builder)

    result = clean_project(service)

    return result
コード例 #2
0
ファイル: build.py プロジェクト: jamofer/cpm
def execute(argv):
    create_parser = argparse.ArgumentParser(prog='cpm build',
                                            description='cpm build',
                                            add_help=False)
    create_parser.add_argument('target', nargs='?', default='default')
    args = create_parser.parse_args(argv)

    project_loader = ProjectLoader()
    cmakelists_builder = CMakeListsBuilder()
    project_commands = ProjectCommands()
    service = CompilationService(project_loader, cmakelists_builder,
                                 project_commands)

    result = build_project(service, args.target)

    return result
コード例 #3
0
ファイル: test.py プロジェクト: jamofer/cpm
def execute(argv):
    add_target_parser = argparse.ArgumentParser(
        prog='cpm test',
        description='cpm, modern C/C++ system',
        add_help=False)
    add_target_parser.add_argument('files_or_dirs', nargs=argparse.REMAINDER)
    args = add_target_parser.parse_args(argv)

    project_loader = ProjectLoader()
    cmakelists_builder = CMakeListsBuilder()
    project_commands = ProjectCommands()
    service = TestService(project_loader, cmakelists_builder, project_commands)

    result = run_tests(service, args.files_or_dirs)

    return result