2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

added capability to handle <fflags>

[SVN r29171]
This commit is contained in:
Toon Knapen
2005-05-24 15:27:30 +00:00
parent 635a997daa
commit ec44facdd2
5 changed files with 22 additions and 7 deletions

View File

@@ -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 ;

View File

@@ -259,6 +259,8 @@ rule handle-options ( toolset : condition * : command * : options * )
[ feature.get-values <cflags> : $(options) ] : unchecked ;
toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
[ feature.get-values <cxxflags> : $(options) ] : unchecked ;
toolset.flags $(toolset).compile.fortran OPTIONS $(condition) :
[ feature.get-values <fflags> : $(options) ] : unchecked ;
toolset.flags $(toolset).link OPTIONS $(condition) :
[ feature.get-values <linkflags> : $(options) ] : unchecked ;
}

View File

@@ -12,6 +12,7 @@ import "class" : new ;
import type ;
import generators ;
import common ;
type.register FORTRAN : f ;

View File

@@ -13,6 +13,8 @@ rule init ( version ? : command * : options * )
}
# Declare flags and action for compilation
flags gfortran OPTIONS <fflags> ;
flags gfortran OPTIONS <optimization>off : -O0 ;
flags gfortran OPTIONS <optimization>speed : -O3 ;
flags gfortran OPTIONS <optimization>space : -Os ;
@@ -23,13 +25,13 @@ flags gfortran OPTIONS <profiling>on : -pg ;
flags gfortran DEFINES <define> ;
flags gfortran INCLUDES <include> ;
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 ;

View File

@@ -13,6 +13,8 @@ rule init ( version ? : command * : options * )
}
# Declare flags and action for compilation
flags ifort OPTIONS <fflags> ;
flags ifort OPTIONS <optimization>off : /Od ;
flags ifort OPTIONS <optimization>speed : /O3 ;
flags ifort OPTIONS <optimization>space : /O1 ;
@@ -20,16 +22,23 @@ flags ifort OPTIONS <optimization>space : /O1 ;
flags ifort OPTIONS <debug-symbols>on : /debug:full ;
flags ifort OPTIONS <profiling>on : /Qprof_gen ;
flags ifort.compile FFLAGS <runtime-debugging>off/<link-runtime>shared : /MD ;
flags ifort.compile FFLAGS <runtime-debugging>on/<link-runtime>shared : /MDd ;
flags ifort.compile FFLAGS <runtime-debugging>off/<link-runtime>static/<threading>single : /ML ;
flags ifort.compile FFLAGS <runtime-debugging>on/<link-runtime>static/<threading>single : /MLd ;
flags ifort.compile FFLAGS <runtime-debugging>off/<link-runtime>static/<threading>multi : /MT ;
flags ifort.compile FFLAGS <runtime-debugging>on/<link-runtime>static/<threading>multi : /MTd ;
flags ifort DEFINES <define> ;
flags ifort INCLUDES <include> ;
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 ;