1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package com.github.maven_nar.cpptasks.intel;
22
23 import org.apache.tools.ant.types.Environment;
24
25 import com.github.maven_nar.cpptasks.compiler.LinkType;
26 import com.github.maven_nar.cpptasks.compiler.Linker;
27 import com.github.maven_nar.cpptasks.compiler.Processor;
28 import com.github.maven_nar.cpptasks.gcc.GccCompatibleCCompiler;
29
30 public final class IntelLinuxFortranCompiler extends GccCompatibleCCompiler {
31 private static final IntelLinuxFortranCompiler instance = new IntelLinuxFortranCompiler(false,
32 new IntelLinuxFortranCompiler(true, null, false, null), false, null);
33
34 public static IntelLinuxFortranCompiler getInstance() {
35 return instance;
36 }
37
38 private IntelLinuxFortranCompiler(final boolean isLibtool, final IntelLinuxFortranCompiler libtoolCompiler,
39 final boolean newEnvironment, final Environment env) {
40 super("ifort", "-V", isLibtool, libtoolCompiler, newEnvironment, env);
41 }
42
43 @Override
44 public Processor changeEnvironment(final boolean newEnvironment, final Environment env) {
45 if (newEnvironment || env != null) {
46 return new IntelLinuxFortranCompiler(getLibtool(), (IntelLinuxFortranCompiler) getLibtoolCompiler(),
47 newEnvironment, env);
48 }
49 return this;
50 }
51
52 @Override
53 public Linker getLinker(final LinkType type) {
54 return IntelLinux32Linker.getInstance().getLinker(type);
55 }
56
57 @Override
58 public int getMaximumCommandLength() {
59 return Integer.MAX_VALUE;
60 }
61 }
62