1 /* 2 * #%L 3 * Native ARchive plugin for Maven 4 * %% 5 * Copyright (C) 2002 - 2014 NAR Maven Plugin developers. 6 * %% 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * #L% 19 */ 20 package com.github.maven_nar.cpptasks.compiler; 21 22 import java.io.File; 23 24 /** 25 * A compiler that can utilize precompilation of header files 26 * 27 * @author Curt Arnold 28 */ 29 public interface PrecompilingCompiler { 30 /** 31 * 32 * This method may be used to get two distinct compiler configurations, one 33 * for compiling the specified file and producing a precompiled header 34 * file, and a second for compiling other files using the precompiled 35 * header file. 36 * 37 * The last (preferrably only) include directive in the prototype file will 38 * be used to mark the boundary between pre-compiled and normally compiled 39 * headers. 40 * 41 * @param config 42 * base configuration 43 * @param prototype 44 * A source file (for example, stdafx.cpp) that is used to build 45 * the precompiled header file. @returns null if precompiled 46 * headers are not supported or a two element array containing 47 * the precompiled header generation configuration and the 48 * consuming configuration 49 * 50 */ 51 CompilerConfiguration[] createPrecompileConfigurations(CompilerConfiguration config, File prototype, 52 String[] nonPrecompiledFiles); 53 }