Package com.github.maven_nar.cpptasks.compiler

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


            while (targetVectorEnum.hasNext()) {
                Vector<TargetInfo> targetsForConfig = targetVectorEnum.next();
                //
                //    get the configuration from the first entry
                //
                CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
                        .elementAt(0)).getConfiguration();
                if (config.isPrecompileGeneration()) {
                    targetVectors[index++] = targetsForConfig;
                }
            }
            targetVectorEnum = targetsByConfig.values().iterator();
            while (targetVectorEnum.hasNext()) {
                Vector<TargetInfo> targetsForConfig = targetVectorEnum.next();
                for (int i = 0; i < targetVectors.length; i++) {
                    if (targetVectors[i] == targetsForConfig) {
                        break;
                    }
                    if (targetVectors[i] == null) {
                        targetVectors[i] = targetsForConfig;
                        break;
                    }
                }
            }
            // BEGINFREEHEP
            Progress progress = new Progress(getObjdir(), rebuildCount);
            progress.start();
            // ENDFREEHEP
           
            for (int i = 0; i < targetVectors.length; i++) {
                //
                //    get the targets for this configuration
                //
                Vector<TargetInfo> targetsForConfig = targetVectors[i];
                //
                //    get the configuration from the first entry
                //
                CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
                        .elementAt(0)).getConfiguration();
                //
                //    prepare the list of source files
                //
               
View Full Code Here


            int dependencyDepth) {
        //    look at any files where the compositeLastModified
        //    is not known, but the includes are known
        //
        boolean mustRebuild = false;
        CompilerConfiguration compiler = (CompilerConfiguration) target
                .getConfiguration();
        String includePathIdentifier = compiler.getIncludePathIdentifier();
        File[] sources = target.getSources();
        DependencyInfo[] dependInfos = new DependencyInfo[sources.length];
        long outputLastModified = target.getOutput().lastModified();
        //
        //   try to solve problem using existing dependency info
View Full Code Here

  /**
   * Test that a target with no existing object file is
   *    returned by getTargetsToBuildByConfiguration.
   */
  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")}
View Full Code Here

   * Test that a target that is up to date is not returned by
   *           getTargetsToBuildByConfiguration.
   *
   */
  public void testGetTargetsToBuildByConfiguration2() {
    CompilerConfiguration config1 = new CommandLineCompilerConfiguration(
        (GccCCompiler) GccCCompiler.getInstance(), "dummy",
        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
View Full Code Here

            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
    public void testConstructorNullOutput() {
        CompilerConfiguration config = new DummyConfiguration();
        try {
            new TargetInfo(config, new File[]{new File("")}, null, null, false);
            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
View Full Code Here

            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
    public void testConstructorNullSource() {
        CompilerConfiguration config = new DummyConfiguration();
        try {
            new TargetInfo(config, null, null, new File(""), false);
            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
View Full Code Here

            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
    public void testGetRebuild() {
        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 = new TargetInfo(config, new File[]{new File("FoO.BaR")},
                null, new File("foo.o"), true);
View Full Code Here

        targetInfo = new TargetInfo(config, new File[]{new File("FoO.BaR")},
                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

                "FoO.BaR")}, null, new File("foo.o"), false);
        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);
View Full Code Here

        assertTrue(hasSame);
        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

TOP

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

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.