Make WAF scripts modify PATH in environment to allow child processes to find the ns-3 DLLs, instead of using --rpath, which doesn't work on win32. This way at least waf check is able to run the unit tests now.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 17 May 2007 17:34:19 +0100
changeset 648 0d190fe2b5ea
parent 647 04f34a8befb8
child 649 1d12fb509a0d
Make WAF scripts modify PATH in environment to allow child processes to find the ns-3 DLLs, instead of using --rpath, which doesn't work on win32. This way at least waf check is able to run the unit tests now.
src/wscript
--- a/src/wscript	Thu May 17 17:02:03 2007 +0100
+++ b/src/wscript	Thu May 17 17:34:19 2007 +0100
@@ -1,5 +1,7 @@
 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
+import os
+import sys
 import Params
 
 all_modules = [
@@ -37,7 +39,10 @@
     if not env['DISABLE_RPATH']:
         for module in all_modules:
             node = bld.m_curdirnode.find_dir(module)
-            env.append_value('RPATH', '-Wl,--rpath=%s' % (node.abspath(env),))
+            if sys.platform == 'win32':
+                os.environ["PATH"] = ';'.join([os.environ["PATH"], node.abspath(env)])
+            else:
+                env.append_value('RPATH', '-Wl,--rpath=%s' % (node.abspath(env),))
     
     bld.add_subdirs(all_modules)