diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 51d39a2ee..1b5181855 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -25,6 +25,7 @@ import rc ; import regex ; import set ; import unix ; +import fortran ; if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] @@ -224,6 +225,7 @@ if [ os.name ] = NT generators.register-c-compiler gcc.compile.c++ : CPP : OBJ : gcc ; generators.register-c-compiler gcc.compile.c : C : OBJ : gcc ; generators.register-c-compiler gcc.compile.asm : ASM : OBJ : gcc ; +generators.register-fortran-compiler gcc.compile.fortran : FORTRAN FORTRAN90 : OBJ : gcc ; # pch support @@ -400,6 +402,7 @@ toolset.flags gcc.compile.c++ USER_OPTIONS ; toolset.flags gcc.compile DEFINES ; toolset.flags gcc.compile INCLUDES ; toolset.flags gcc.compile.c++ TEMPLATE_DEPTH ; +toolset.flags gcc.compile.fortran USER_OPTIONS ; rule compile.c++.pch ( targets * : sources * : properties * ) { @@ -471,6 +474,10 @@ rule compile.c ( targets * : sources * : properties * ) DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ; } +rule compile.fortran +{ +} + actions compile.c++ bind PCH_FILE { "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)" @@ -481,6 +488,11 @@ actions compile.c bind PCH_FILE "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } +actions compile.fortran +{ + "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)" +} + rule compile.asm { LANG on $(<) = "-x assembler-with-cpp" ; diff --git a/v2/tools/gfortran.jam b/v2/tools/gfortran.jam index bd7fe70a2..0aa69b85c 100644 --- a/v2/tools/gfortran.jam +++ b/v2/tools/gfortran.jam @@ -36,4 +36,4 @@ 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 FORTRAN90 : OBJ ; diff --git a/v2/tools/intel-linux.jam b/v2/tools/intel-linux.jam index 97effd848..9a4f11ae0 100644 --- a/v2/tools/intel-linux.jam +++ b/v2/tools/intel-linux.jam @@ -150,6 +150,11 @@ actions compile.c++.pch rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)" } +actions compile.fortran +{ + "ifort" -c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" +} + rule compile.c.pch ( targets * : sources * : properties * ) { gcc.setup-threading $(targets) : $(sources) : $(properties) ;