Examples of TargetInfo


Examples of com.github.maven_nar.cpptasks.TargetInfo

                null, new File("foo.o"), true);
        assertEquals(true, targetInfo.getRebuild());
    }
    public void testGetSource() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "FoO.BaR")}, null, new File("foo.o"), false);
        String source = targetInfo.getSources()[0].getName();
        assertEquals(source, "FoO.BaR");
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

        String source = targetInfo.getSources()[0].getName();
        assertEquals(source, "FoO.BaR");
    }
    public void testHasSameSource() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "foo.bar")}, null, new File("foo.o"), false);
        boolean hasSame = targetInfo.getSources()[0]
                .equals(new File("foo.bar"));
        assertTrue(hasSame);
        hasSame = targetInfo.getSources()[0].equals(new File("boo.far"));
        assertEquals(hasSame, false);
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

        hasSame = targetInfo.getSources()[0].equals(new File("boo.far"));
        assertEquals(hasSame, false);
    }
    public void testMustRebuild() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "FoO.BaR")}, null, new File("foo.o"), false);
        assertEquals(false, targetInfo.getRebuild());
        targetInfo.mustRebuild();
        assertEquals(true, targetInfo.getRebuild());
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

  public void testGetTargetsToBuildByConfiguration1() {
    CompilerConfiguration config1 = new CommandLineCompilerConfiguration(
        (GccCCompiler) GccCCompiler.getInstance(), "dummy",
        new File[0], new File[0], new File[0], "", new String[0],
        new ProcessorParam[0], true, new String[0]);
    TargetInfo target1 = new TargetInfo(config1, new File[] {new File(
        "src/foo.bar")}
                                        , null, new File("foo.obj"), true);
    Map targets = new HashMap();
    targets.put(target1.getOutput(), target1);
    Map targetsByConfig = CCTask
        .getTargetsToBuildByConfiguration(targets);
    Vector targetsForConfig1 = (Vector) targetsByConfig.get(config1);
    assertNotNull(targetsForConfig1);
    assertEquals(1, targetsForConfig1.size());
    TargetInfo targetx = (TargetInfo) targetsForConfig1.elementAt(0);
    assertSame(target1, targetx);
  }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

        new File[0], new File[0], new File[0], "", new String[0],
        new ProcessorParam[0], false, new String[0]);
    //
    //    target doesn't need to be rebuilt
    //
    TargetInfo target1 = new TargetInfo(config1, new File[] {new File(
        "src/foo.bar")}
                                        , null, new File("foo.obj"), false);
    Map targets = new HashMap();
    targets.put(target1.getOutput(), target1);
    //
    //    no targets need to be built, return a zero-length hashtable
    //
    Map targetsByConfig = CCTask
        .getTargetsToBuildByConfiguration(targets);
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

    //
    //   get the first target and assume that it is representative
    //
    Iterator targetIter = targets.values().iterator();
    while (targetIter.hasNext()) {
      TargetInfo targetInfo = (TargetInfo) targetIter.next();
      ProcessorConfiguration config = targetInfo.getConfiguration();
      //
      //   for the first cl compiler
      //
      if (config instanceof CommandLineCompilerConfiguration) {
        compilerConfig = (CommandLineCompilerConfiguration) config;
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

                                 compilerConfig.getCommand());
    }

    Iterator targetIter = targets.values().iterator();
    while (targetIter.hasNext()) {
      TargetInfo info = (TargetInfo) targetIter.next();
      File[] targetsources = info.getSources();
      for (int i = 0; i < targetsources.length; i++) {
        String relativePath = CUtil.getRelativePath(basePath,
            targetsources[i]);
        fileAttributes.setValue(0, relativePath);
        content.startElement(null, "file", "file", fileAttributes);
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

    //
    //   get the first target and assume that it is representative
    //
    Iterator targetIter = targets.values().iterator();
    while (targetIter.hasNext()) {
      TargetInfo targetInfo = (TargetInfo) targetIter.next();
      ProcessorConfiguration config = targetInfo.getConfiguration();
      String identifier = config.getIdentifier();
      //
      //   for the first gcc or bcc compiler
      //
      if (config instanceof CommandLineCompilerConfiguration) {
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

        List sourceGroupChildren = new ArrayList();

        ArrayList sourceList = new ArrayList(targets.size());
        Iterator targetIter = targets.values().iterator();
        while (targetIter.hasNext()) {
            TargetInfo info = (TargetInfo) targetIter.next();
            File[] targetsources = info.getSources();
            for (int i = 0; i < targetsources.length; i++) {
                sourceList.add(targetsources[i]);
            }
        }
        Object[] sortedSources = sourceList.toArray();
View Full Code Here

Examples of com.github.maven_nar.cpptasks.TargetInfo

        //
        //   get the first target and assume that it is representative
        //
        Iterator targetIter = targets.values().iterator();
        while (targetIter.hasNext()) {
            TargetInfo targetInfo = (TargetInfo) targetIter.next();
            ProcessorConfiguration config = targetInfo.getConfiguration();
            //
            //   for the first cl compiler
            //
            if (config instanceof CommandLineCompilerConfiguration) {
                compilerConfig = (CommandLineCompilerConfiguration) config;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.