Package com.github.maven_nar.cpptasks.compiler

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


    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

     */
    public void testAddImpliedArgsDarwinPlugin() {
        System.setProperty("os.name", "Mac OS X");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("plugin");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-bundle", args.elementAt(0));
    }
View Full Code Here

     */
    public void testAddImpliedArgsDarwinShared() {
        System.setProperty("os.name", "Mac OS X");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("shared");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        // FIXME NAR-103
        // BEGINFREEHEP
        assertEquals(1, args.size());
        assertEquals("-dynamiclib", args.elementAt(0));
View Full Code Here

     */
    public void testAddImpliedArgsNonDarwinPlugin() {
        System.setProperty("os.name", "VAX/VMS");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("plugin");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-shared", args.elementAt(0));
    }
View Full Code Here

     */
    public void testAddImpliedArgsNonDarwinShared() {
        System.setProperty("os.name", "VAX/VMS");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("shared");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-shared", args.elementAt(0));
    }
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

    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

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.