Search in sources :

Example 1 with NarLinker

use of com.github.sdedwards.m2e_nar.internal.model.NarLinker in project m2e-nar by maven-nar.

the class NarExecutionBuilder method buildLinkerSettings.

@SuppressWarnings("unchecked")
public NarLinker buildLinkerSettings(final ILinker linker, final boolean linkCpp, final ITest test) throws MojoFailureException, MojoExecutionException {
    NarLinker settings = new NarLinker();
    settings.setName(linker.getName());
    List<NarLib> libs = settings.getLibs();
    for (Iterator<?> it = linker.getLibs().iterator(); it.hasNext(); ) {
        libs.add(buildLibSettings((ILib) it.next()));
    }
    List<NarSysLib> sysLibs = settings.getSysLibs();
    for (Iterator<?> it = linker.getSysLibs().iterator(); it.hasNext(); ) {
        sysLibs.add(buildSysLibSettings((ISysLib) it.next()));
    }
    settings.setIncremental(linker.isIncremental());
    settings.setMap(linker.isMap());
    List<String> options = settings.getOptions();
    options.addAll(linker.getOptions());
    if (test != null) {
        List<String> testOptions = linker.getTestOptions();
        if (testOptions != null) {
            options.addAll(testOptions);
        }
    }
    settings.setLinkCpp(linkCpp);
    return settings;
}
Also used : NarLib(com.github.sdedwards.m2e_nar.internal.model.NarLib) NarSysLib(com.github.sdedwards.m2e_nar.internal.model.NarSysLib) ISysLib(com.github.maven_nar.ISysLib) NarLinker(com.github.sdedwards.m2e_nar.internal.model.NarLinker) ILib(com.github.maven_nar.ILib)

Aggregations

ILib (com.github.maven_nar.ILib)1 ISysLib (com.github.maven_nar.ISysLib)1 NarLib (com.github.sdedwards.m2e_nar.internal.model.NarLib)1 NarLinker (com.github.sdedwards.m2e_nar.internal.model.NarLinker)1 NarSysLib (com.github.sdedwards.m2e_nar.internal.model.NarSysLib)1