summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/ifort.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-10-10 13:41:24 (GMT)
committerSteven Knight <knight@baldmt.com>2005-10-10 13:41:24 (GMT)
commita7a4f5a28a1d825734b56bc2e8e3a559b44c1564 (patch)
treedd903bbdb54698c258d64bd3bc50ee79c516412e /src/engine/SCons/Tool/ifort.py
parent49cf589d13237f9ccdc0ae384bf40d3776065bb7 (diff)
downloadSCons-a7a4f5a28a1d825734b56bc2e8e3a559b44c1564.zip
SCons-a7a4f5a28a1d825734b56bc2e8e3a559b44c1564.tar.gz
SCons-a7a4f5a28a1d825734b56bc2e8e3a559b44c1564.tar.bz2
On Windows, the Intel Fortran compiler (ifort) uses -object: instead of -o as the command-line option for output object files. Massage command lines appropriately.
Diffstat (limited to 'src/engine/SCons/Tool/ifort.py')
-rw-r--r--src/engine/SCons/Tool/ifort.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/ifort.py b/src/engine/SCons/Tool/ifort.py
index 181078a..7681f38 100644
--- a/src/engine/SCons/Tool/ifort.py
+++ b/src/engine/SCons/Tool/ifort.py
@@ -34,6 +34,8 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import string
+
import SCons.Defaults
import fortran
@@ -58,5 +60,14 @@ def generate(env):
# be in shared libraries.
env['SHLINKFLAGS'] = '-shared -no_archive'
+ #
+ if env['PLATFORM'] == 'win32':
+ # On Windows, the ifort compiler specifies the object on the
+ # command line with -object:, not -o. Massage the necessary
+ # command-line construction variables.
+ for var in ['_FORTRANCOMD', '_FORTRANPPCOMD',
+ '_SHFORTRANCOMD', '_SHFORTRANPPCOMD']:
+ env[var] = string.replace(env[var], '-o $TARGET', '-object:$TARGET')
+
def exists(env):
return env.Detect('ifort')