Bug 681: wrong compilation options for icpc (Intel C/C++ Compiler)
authorAndrey Mazo <mazo@iitp.ru>
Fri, 25 Sep 2009 12:28:32 +0100
changeset 5252 481053e0cd10
parent 5251 306856feb249
child 5254 13bf9ed555f9
Bug 681: wrong compilation options for icpc (Intel C/C++ Compiler)
src/wscript
wscript
--- a/src/wscript	Fri Sep 25 12:15:27 2009 +0100
+++ b/src/wscript	Fri Sep 25 12:28:32 2009 +0100
@@ -87,7 +87,7 @@
     module.module_deps = list(dependencies)
     if not module.env['ENABLE_STATIC_NS3']:
         module.env.append_value('CXXFLAGS', module.env['shlib_CXXFLAGS'])
-    elif module.env['CXX_NAME'] == 'gcc' and \
+    elif module.env['CXX_NAME'] in ['gcc', 'icc'] and \
             os.uname()[4] == 'x86_64' and \
             module.env['ENABLE_PYTHON_BINDINGS']:
         # enable that flag for static builds only on x86-64 platforms
--- a/wscript	Fri Sep 25 12:15:27 2009 +0100
+++ b/wscript	Fri Sep 25 12:28:32 2009 +0100
@@ -284,7 +284,7 @@
 
     env['PLATFORM'] = sys.platform
 
-    if conf.env['CXX_NAME'] == 'gcc':
+    if conf.env['CXX_NAME'] in ['gcc', 'icc']:
         if sys.platform == 'win32':
             env.append_value("LINKFLAGS", "-Wl,--enable-runtime-pseudo-reloc")
         elif sys.platform == 'cygwin':
@@ -332,7 +332,7 @@
     env['ENABLE_STATIC_NS3'] = False
     if Options.options.enable_static:
         if env['PLATFORM'].startswith('linux') and \
-                env['CXX_NAME'] == 'gcc':
+                env['CXX_NAME'] in ['gcc', 'icc']:
             if re.match('i[3-6]86', os.uname()[4]):
                 conf.report_optional_feature("static", "Static build", True, '')
                 env['ENABLE_STATIC_NS3'] = True
@@ -532,7 +532,7 @@
         lib = bld.new_task_gen('cxx', 'shlib')
         lib.name = 'ns3'
         lib.target = 'ns3'
-        if lib.env['CXX_NAME'] == 'gcc' and env['WL_SONAME_SUPPORTED']:
+        if lib.env['CXX_NAME'] in ['gcc', 'icc'] and env['WL_SONAME_SUPPORTED']:
             lib.env.append_value('LINKFLAGS', '-Wl,--soname=%s' % ccroot.get_target_name(lib))
         if sys.platform == 'cygwin':
             lib.features.append('implib') # workaround for WAF bug #472