Package com.github.maven_nar.cpptasks.compiler

Examples of com.github.maven_nar.cpptasks.compiler.LinkType


     * Tests if isPluginModule returns true when set to plugin output type
     *
     * See patch [ 676276 ] Enhanced support for Mac OS X
     */
    public void testIsPluginFalse() {
        LinkType type = new LinkType();
        OutputTypeEnum pluginType = new OutputTypeEnum();
        pluginType.setValue("executable");
        type.setOutputType(pluginType);
        assertTrue(!type.isPluginModule());
    }
View Full Code Here


     * Tests if isPluginModule returns true when set to plugin output type
     *
     * See patch [ 676276 ] Enhanced support for Mac OS X
     */
    public void testIsPluginTrue() {
        LinkType type = new LinkType();
        OutputTypeEnum pluginType = new OutputTypeEnum();
        pluginType.setValue("plugin");
        type.setOutputType(pluginType);
        assertTrue(type.isPluginModule());
    }
View Full Code Here

    protected void setProcessor(Processor proc) throws BuildException {
        Linker linker = null;
        if (proc instanceof Linker) {
            linker = (Linker) proc;
        } else {
            LinkType linkType = new LinkType();
            linker = proc.getLinker(linkType);
        }
        super.setProcessor(linker);
    }
View Full Code Here

    public void testGetLinkerDarwinPlugin() {
        System.setProperty("os.name", "Mac OS X");
        GccLinker linker = GccLinker.getInstance();
        OutputTypeEnum outputType = new OutputTypeEnum();
        outputType.setValue("plugin");
        LinkType linkType = new LinkType();
        linkType.setOutputType(outputType);
        Linker pluginLinker = linker.getLinker(linkType);
        assertEquals("libfoo.bundle", pluginLinker.getOutputFileNames("foo", null)[0]);
    }
View Full Code Here

    public void testGetLinkerDarwinShared() {
        System.setProperty("os.name", "Mac OS X");
        GccLinker linker = GccLinker.getInstance();
        OutputTypeEnum outputType = new OutputTypeEnum();
        outputType.setValue("shared");
        LinkType linkType = new LinkType();
        linkType.setOutputType(outputType);
        Linker sharedLinker = linker.getLinker(linkType);
        assertEquals("libfoo.dylib", sharedLinker.getOutputFileNames("foo", null)[0]);
    }
View Full Code Here

    public void testGetLinkerNonDarwinPlugin() {
        System.setProperty("os.name", "Microsoft Windows");
        GccLinker linker = GccLinker.getInstance();
        OutputTypeEnum outputType = new OutputTypeEnum();
        outputType.setValue("plugin");
        LinkType linkType = new LinkType();
        linkType.setOutputType(outputType);
        Linker pluginLinker = linker.getLinker(linkType);
        assertEquals("libfoo.so", pluginLinker.getOutputFileNames("foo", null)[0]);
    }
View Full Code Here

    public void testGetLinkerNonDarwinShared() {
        System.setProperty("os.name", "Microsoft Windows");
        GccLinker linker = GccLinker.getInstance();
        OutputTypeEnum outputType = new OutputTypeEnum();
        outputType.setValue("shared");
        LinkType linkType = new LinkType();
        linkType.setOutputType(outputType);
        Linker sharedLinker = linker.getLinker(linkType);
        assertEquals("libfoo.so", sharedLinker.getOutputFileNames("foo", null)[0]);
    }
View Full Code Here

    baseCompiler.setMultithreaded(false);
    CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
        baseCompiler);
    setCompilerName(extendedCompiler, "msvc");
    CCTask cctask = new CCTask();
    LinkType linkType = new LinkType();
    linkType.setStaticRuntime(true);
    CommandLineCompilerConfiguration config = (CommandLineCompilerConfiguration)
        extendedCompiler
        .createConfiguration(cctask, linkType, null, null, null);
    String[] preArgs = config.getPreArguments();
    assertEquals("/ML", preArgs[3]);
View Full Code Here

    protected void setProcessor(Processor proc) throws BuildException {
        Linker linker = null;
        if (proc instanceof Linker) {
            linker = (Linker) proc;
        } else {
            LinkType linkType = new LinkType();
            linker = proc.getLinker(linkType);
        }
        super.setProcessor(linker);
    }
View Full Code Here

   * @return configuration
   */
  protected final ProcessorConfiguration getConfiguration(
      final ProcessorDef extendedProcessor) {
    CCTask cctask = new CCTask();
    LinkType linkType = new LinkType();
    return extendedProcessor.createConfiguration(cctask,
                                                 linkType,
                                                 null,
                                                 null,
                                                 null);
View Full Code Here

TOP

Related Classes of com.github.maven_nar.cpptasks.compiler.LinkType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.