Example #1
0
def make(project: c.Project, build_args):
    """
    Build current PROS project or cwd
    """
    exit_code = project.compile(build_args)
    if exit_code != 0:
        logger(__name__).debug(f'Failed to make project: Exit Code {exit_code}')
        raise click.ClickException('Failed to build')
    return exit_code
Example #2
0
def build_compile_commands(project: c.Project, suppress_output: bool, compile_commands, sandbox: bool,
                           build_args: List[str]):
    """
    Build a compile_commands.json compatible with cquery
    :return:
    """
    exit_code = project.make_scan_build(build_args, cdb_file=compile_commands, suppress_output=suppress_output,
                                        sandbox=sandbox)
    if exit_code != 0:
        logger(__name__).debug(f'Failed to make project: Exit Code {exit_code}')
        raise click.ClickException('Failed to build')
    return exit_code