Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59284 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2010-01-27 15:49:57


Author: vladimir_prus
Date: 2010-01-27 15:49:56 EST (Wed, 27 Jan 2010)
New Revision: 59284
URL: http://svn.boost.org/trac/boost/changeset/59284

Log:
Improve fortran support.

Patch from Spencer Olson.

Text files modified:
   trunk/tools/build/v2/tools/gcc.jam | 12 ++++++++++++
   trunk/tools/build/v2/tools/gfortran.jam | 2 +-
   trunk/tools/build/v2/tools/intel-linux.jam | 5 +++++
   3 files changed, 18 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2010-01-27 15:49:56 EST (Wed, 27 Jan 2010)
@@ -25,6 +25,7 @@
 import regex ;
 import set ;
 import unix ;
+import fortran ;
 
 
 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
@@ -224,6 +225,7 @@
 generators.register-c-compiler gcc.compile.c++ : CPP : OBJ : <toolset>gcc ;
 generators.register-c-compiler gcc.compile.c : C : OBJ : <toolset>gcc ;
 generators.register-c-compiler gcc.compile.asm : ASM : OBJ : <toolset>gcc ;
+generators.register-fortran-compiler gcc.compile.fortran : FORTRAN FORTRAN90 : OBJ : <toolset>gcc ;
 
 # pch support
 
@@ -400,6 +402,7 @@
 toolset.flags gcc.compile DEFINES <define> ;
 toolset.flags gcc.compile INCLUDES <include> ;
 toolset.flags gcc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
+toolset.flags gcc.compile.fortran USER_OPTIONS <fflags> ;
 
 rule compile.c++.pch ( targets * : sources * : properties * )
 {
@@ -471,6 +474,10 @@
     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 @@
     "$(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" ;

Modified: trunk/tools/build/v2/tools/gfortran.jam
==============================================================================
--- trunk/tools/build/v2/tools/gfortran.jam (original)
+++ trunk/tools/build/v2/tools/gfortran.jam 2010-01-27 15:49:56 EST (Wed, 27 Jan 2010)
@@ -36,4 +36,4 @@
   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 ;

Modified: trunk/tools/build/v2/tools/intel-linux.jam
==============================================================================
--- trunk/tools/build/v2/tools/intel-linux.jam (original)
+++ trunk/tools/build/v2/tools/intel-linux.jam 2010-01-27 15:49:56 EST (Wed, 27 Jan 2010)
@@ -150,6 +150,11 @@
     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) ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk