@Test public void testBoost() throws Exception { BuildFindModuleFunctionTable builder = new BuildFindModuleFunctionTable(); builder.addManifest(ResolvedManifests.boost().manifest); FunctionTableExpression table = builder.build(); String result = new CMakeGenerator(environment, table).create(); System.out.printf(result); }
@NotNull public String create() { append("# GENERATED FILE. DO NOT EDIT.\n"); append(readCmakeLibraryFunctions()); for (StatementExpression findFunction : table.findFunctions.values()) { indent = 0; visit(findFunction); require(indent == 0); } append("\nfunction(add_all_cdep_dependencies target)\n"); for (StatementExpression findFunction : table.findFunctions.values()) { FindModuleExpression finder = getFindFunction(findFunction); String function = getAddDependencyFunctionName(finder.coordinate); append(" %s(${target})\n", function); } append("endfunction(add_all_cdep_dependencies)\n"); return sb.toString(); }
CMakeGenerator { @NotNull public String create() { append("# GENERATED FILE. DO NOT EDIT.\n"); append(readCmakeLibraryFunctions()); for (StatementExpression findFunction : table.findFunctions.values()) { indent = 0; visit(findFunction); require(indent == 0); } append("\nfunction(add_all_cdep_dependencies target)\n"); for (StatementExpression findFunction : table.findFunctions.values()) { FindModuleExpression finder = getFindFunction(findFunction); String function = getAddDependencyFunctionName(finder.coordinate); append(" %s(${target})\n", function); } append("endfunction(add_all_cdep_dependencies)\n"); return sb.toString(); } }
CMakeGenerator { @NotNull public String create() { append("# GENERATED FILE. DO NOT EDIT.\n"); append(readCmakeLibraryFunctions()); for (StatementExpression findFunction : table.findFunctions.values()) { indent = 0; visit(findFunction); require(indent == 0); } append("\nfunction(add_all_cdep_dependencies target)\n"); for (StatementExpression findFunction : table.findFunctions.values()) { FindModuleExpression finder = getFindFunction(findFunction); String function = getAddDependencyFunctionName(finder.coordinate); append(" %s(${target})\n", function); } append("endfunction(add_all_cdep_dependencies)\n"); return sb.toString(); } CMakeGenerator(@NotNull GeneratorEnvironment environment, @NotNull FunctionTableExpression table); }
CMakeGenerator { @NotNull public String create() { append("# GENERATED FILE. DO NOT EDIT.\n"); append(readCmakeLibraryFunctions()); for (StatementExpression findFunction : table.findFunctions.values()) { indent = 0; visit(findFunction); require(indent == 0); } append("\nfunction(add_all_cdep_dependencies target)\n"); for (StatementExpression findFunction : table.findFunctions.values()) { FindModuleExpression finder = getFindFunction(findFunction); String function = getAddDependencyFunctionName(finder.coordinate); append(" %s(${target})\n", function); } append("endfunction(add_all_cdep_dependencies)\n"); return sb.toString(); } CMakeGenerator(@NotNull GeneratorEnvironment environment, @NotNull FunctionTableExpression table); void generate(); @NotNull String create(); }
CMakeGenerator { @NotNull public String create() { append("# GENERATED FILE. DO NOT EDIT.\n"); append(readCmakeLibraryFunctions()); for (StatementExpression findFunction : table.findFunctions.values()) { indent = 0; visit(findFunction); require(indent == 0); } append("\nfunction(add_all_cdep_dependencies target)\n"); for (StatementExpression findFunction : table.findFunctions.values()) { FindModuleExpression finder = getFindFunction(findFunction); String function = getAddDependencyFunctionName(finder.coordinate); append(" %s(${target})\n", function); } append("endfunction(add_all_cdep_dependencies)\n"); return sb.toString(); } CMakeGenerator(@NotNull GeneratorEnvironment environment, @NotNull FunctionTableExpression table); void generate(); @NotNull String create();  }