[Scons-users] comiler flags not applied to all files
Nikola Radovanovic
nikola.radovanovic at schneider-electric-dms.com
Thu Jul 11 07:19:14 EDT 2013
hi all,
I have a bunch of Fortran files; mainly with *.f90 extension, but also few with *.for extension. during compilation, i have noticed that F90FLAGS which I've set to build environment are applied only to *.f90, but not to *.for files (which causes me problems later at link stage).
here is a code snippet (compete env.Dump() is in the attachment):
srcs = Split(""" bunch of *.f90 and *.for files """)
flags = Split("""
/DEMS /DTEST_VC /DVR /DTA /DLF /DPI /DVC /DVV /DFC /DRP /DBC /DFM /DTP /DRA
/DSR /DLA_NOVO /DNL /DCP /DOC /DNP /DHA /DUL /DQC /DMS /DLV /DNA /DTS /DSF
/DLTF /DSSM /DSA /DLS /DLM /DNR /DOM /DTE /DSPACE_32 /DR2PS /DMTF /DVCFE
/nologo /noD /Qpar-report0 /Qvec-report0 /iface:cvf /threads /Qvc8 /libs:dll /dll
""")
env = Environment(FORTRAN = 'ifort', ENV = os.environ, \
tools = ['fortran', 'default', 'mslink', 'ifort'], \
F90FLAGS = ['/fpp'], \
F90PATH = self.src_path, \
FORTRANMODDIRPREFIX = '/module:', \
FORTRANMODDIR = '${TARGET.dir}', \
LIBPATH = self.lib_path, \
LIBS = self.libs, \
LINK = 'link.exe', \
MSVC_USE_SCRIPT = path_to_my_vcvars)
objs = env.SharedObject(srcs, F90FLAGS = flags + ['/fpp'])
and the resulting commands are ie.:
ifort -object:build\release\Source\Dms\file1.obj -c /DEMS /DTEST_VC /DVR /DTA /DLF /DPI /DVC /DVV /DFC /DRP /DBC /DFM /DTP /DRA /DSR /DLA_NOVO /DNL /DCP /DOC /DNP /DHA /DUL /DQC /DMS /DLV /DNA /DTS /DSF /DLTF /DSSM /DSA /DLS /DLM /DNR /DOM /DTE /DSPACE_32 /DR2PS /DMTF /DVCFE /nologo /noD /Qpar-report0 /Qvec-report0 /iface:cvf /threads /Qvc8 /libs:dll /dll /DDMD /fpp -Ibuild\release\Source -ISource\Dms -Iemsapp\EMS_lf\build\release -Iemsapp\EMS_se\build\release /module:build\release\Source\Dms build\release\Source\Dms\file1.f90
ifort -object:build\release\Source\Dms\file2.obj -c /module:build\release\Source\Dms build\release\Source\Dms\file2.for
as you can see, F90FLAGS are not used when compiling *.for file
any help will be appreciated
10x in advance
--
__________________________________________________________________________________________________________________
Nikola Radovanovic | Schneider Electric DMS NS | Smart Grid IT | SERBIA | CPASv2 team deputy
Phone: +381 (0)21 488 3633 | Fax: +381 (0)21 488 3789 | Mobile: +381 (0)64 29 74 528
Email: nikola.radovanovic at schneider-electric-dms.com<mailto:nikola.radovanovic at schneider-electric-dms.com> | Site: www.schneider-electric-dms.com<http://www.schneider-electric-dms.com/> | Address: Narodnog fronta 25A-D, 21000 Novi Sad
*** Please consider the environment before printing this e-mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130711/70a98766/attachment-0001.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: env_dump.txt
Url: http://four.pairlist.net/pipermail/scons-users/attachments/20130711/70a98766/attachment-0001.txt
More information about the Scons-users
mailing list