From ec44facdd2246533350b0eb2aa1dc8ef3ef79118 Mon Sep 17 00:00:00 2001 From: Toon Knapen Date: Tue, 24 May 2005 15:27:30 +0000 Subject: [PATCH] added capability to handle [SVN r29171] --- v2/tools/builtin.jam | 1 + v2/tools/common.jam | 2 ++ v2/tools/fortran.jam | 1 + v2/tools/gfortran.jam | 8 +++++--- v2/tools/ifort.jam | 17 +++++++++++++---- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index 161648217..3780765b3 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -49,6 +49,7 @@ feature define : : free ; feature "include" : : free path ; #order-sensitive ; feature cflags : : free ; feature cxxflags : : free ; +feature fflags : : free ; feature linkflags : : free ; feature archiveflags : : free ; feature version : : free ; diff --git a/v2/tools/common.jam b/v2/tools/common.jam index ba87a86d3..284018cd6 100644 --- a/v2/tools/common.jam +++ b/v2/tools/common.jam @@ -259,6 +259,8 @@ rule handle-options ( toolset : condition * : command * : options * ) [ feature.get-values : $(options) ] : unchecked ; toolset.flags $(toolset).compile.c++ OPTIONS $(condition) : [ feature.get-values : $(options) ] : unchecked ; + toolset.flags $(toolset).compile.fortran OPTIONS $(condition) : + [ feature.get-values : $(options) ] : unchecked ; toolset.flags $(toolset).link OPTIONS $(condition) : [ feature.get-values : $(options) ] : unchecked ; } diff --git a/v2/tools/fortran.jam b/v2/tools/fortran.jam index cefbc25d8..3915aa68a 100644 --- a/v2/tools/fortran.jam +++ b/v2/tools/fortran.jam @@ -12,6 +12,7 @@ import "class" : new ; import type ; import generators ; +import common ; type.register FORTRAN : f ; diff --git a/v2/tools/gfortran.jam b/v2/tools/gfortran.jam index 7185f2c20..c26f5a1cd 100644 --- a/v2/tools/gfortran.jam +++ b/v2/tools/gfortran.jam @@ -13,6 +13,8 @@ rule init ( version ? : command * : options * ) } # Declare flags and action for compilation +flags gfortran OPTIONS ; + flags gfortran OPTIONS off : -O0 ; flags gfortran OPTIONS speed : -O3 ; flags gfortran OPTIONS space : -Os ; @@ -23,13 +25,13 @@ flags gfortran OPTIONS on : -pg ; flags gfortran DEFINES ; flags gfortran INCLUDES ; -rule compile-fortran +rule compile.fortran { } -actions compile-fortran +actions compile.fortran { gcc -Wall $(OPTIONS) -D$(DEFINES) -I$(INCLUDES) -c -o "$(<)" "$(>)" } -generators.register-fortran-compiler gfortran.compile-fortran : FORTRAN : OBJ ; +generators.register-fortran-compiler gfortran.compile.fortran : FORTRAN : OBJ ; diff --git a/v2/tools/ifort.jam b/v2/tools/ifort.jam index d16960143..61ffc4541 100644 --- a/v2/tools/ifort.jam +++ b/v2/tools/ifort.jam @@ -13,6 +13,8 @@ rule init ( version ? : command * : options * ) } # Declare flags and action for compilation +flags ifort OPTIONS ; + flags ifort OPTIONS off : /Od ; flags ifort OPTIONS speed : /O3 ; flags ifort OPTIONS space : /O1 ; @@ -20,16 +22,23 @@ flags ifort OPTIONS space : /O1 ; flags ifort OPTIONS on : /debug:full ; flags ifort OPTIONS on : /Qprof_gen ; +flags ifort.compile FFLAGS off/shared : /MD ; +flags ifort.compile FFLAGS on/shared : /MDd ; +flags ifort.compile FFLAGS off/static/single : /ML ; +flags ifort.compile FFLAGS on/static/single : /MLd ; +flags ifort.compile FFLAGS off/static/multi : /MT ; +flags ifort.compile FFLAGS on/static/multi : /MTd ; + flags ifort DEFINES ; flags ifort INCLUDES ; -rule compile-fortran +rule compile.fortran { } -actions compile-fortran +actions compile.fortran { - ifort $(OPTIONS) /names:lowercase /D$(DEFINES) /I$(INCLUDES) /c /object:"$(<)" "$(>)" + ifort $(FFLAGS) $(OPTIONS) /names:lowercase /D$(DEFINES) /I"$(INCLUDES)" /c /object:"$(<)" "$(>)" } -generators.register-fortran-compiler ifort.compile-fortran : FORTRAN : OBJ ; +generators.register-fortran-compiler ifort.compile.fortran : FORTRAN : OBJ ;