Imported Upstream version 1.51.0
[platform/upstream/boost.git] / tools / build / v2 / tools / ifort.jam
1 # Copyright (C) 2004 Toon Knapen
2 #
3 #  Use, modification and distribution is subject to the Boost Software
4 #  License Version 1.0. (See accompanying file LICENSE_1_0.txt or
5 #  http://www.boost.org/LICENSE_1_0.txt)
6
7 import toolset : flags ;
8 import feature ;
9 import fortran ;
10
11 rule init ( version ? : command * : options * )
12 {
13 }
14
15 # Declare flags and action for compilation
16 flags ifort OPTIONS <fflags> ;
17
18 flags ifort OPTIONS <optimization>off : /Od ;
19 flags ifort OPTIONS <optimization>speed : /O3 ;
20 flags ifort OPTIONS <optimization>space : /O1 ;
21
22 flags ifort OPTIONS <debug-symbols>on : /debug:full ;
23 flags ifort OPTIONS <profiling>on : /Qprof_gen ;
24
25 flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>shared : /MD ;
26 flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>shared : /MDd ;
27 flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>static/<threading>single : /ML ;
28 flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>static/<threading>single : /MLd ;
29 flags ifort.compile FFLAGS <runtime-debugging>off/<runtime-link>static/<threading>multi : /MT ;
30 flags ifort.compile FFLAGS <runtime-debugging>on/<runtime-link>static/<threading>multi : /MTd ;
31
32 flags ifort DEFINES <define> ;
33 flags ifort INCLUDES <include> ;
34
35 rule compile.fortran
36 {
37 }
38
39 actions compile.fortran
40 {
41   ifort $(FFLAGS) $(OPTIONS) /names:lowercase /D$(DEFINES) /I"$(INCLUDES)" /c /object:"$(<)" "$(>)" 
42 }
43
44 generators.register-fortran-compiler ifort.compile.fortran : FORTRAN : OBJ ;