Scons to build F90, with mixed C. C++
- From: "homeofchen" <hangfei@xxxxxxxxx>
- Date: 22 Dec 2005 13:42:47 -0800
Hi, FORTRAN cookies,
I plan to migrate a mixed language build (C, C++, FORTRAN) from imake
and Make into scons.
In Scons documentation, it says it supports ifort. How to invoke it?
Is it enough just have this line?
env = Environment(FORTRAN ='ifort', ENV = os.environ, CC='ifort')
Experts please advice.
Some ons in this group asked a simple example, here it is.
Here is a simple example that works with Intel FORTRAN compiler:
hello.f90 file:
------------------
program test
write (*,*) "hello, FORTRAN"
end program
SConstruct file:
---------------
import os
env = Environment(FORTRAN ='ifort', ENV = os.environ, CC='ifort')
env.Program(target = 'hello' , source = 'hello.f90')
command and output:
-------------------------
l4855nfx: /users/chena/prj/scons/fortran/c1-ifort >scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
ifort -c -o hello.o hello.f90
ifort -o hello hello.o
scons: done building targets.
l4855nfx: /users/chena/prj/scons/fortran/c1-ifort >ll
total 400
-rwxr-xr-x 1 chena console 396635 2005-12-22 16:32 hello*
-rw-r--r-- 1 chena console 60 2005-12-22 16:10 hello.f90
-rw-r--r-- 1 chena console 1245 2005-12-22 16:32 hello.o
-rw-r--r-- 1 chena console 131 2005-12-22 16:25 SConstruct
l4855nfx: /users/chena/prj/scons/fortran/c1-ifort >
~Andrew Chen
.
- Prev by Date: Re: Syntax for passing an external function into a contained function?
- Next by Date: Re: Syntax for passing an external function into a contained function?
- Previous by thread: Syntax for passing an external function into a contained function?
- Next by thread: Need interpretation
- Index(es):
Relevant Pages
|