diff options
Diffstat (limited to 'demoscript/Util.py')
-rw-r--r-- | demoscript/Util.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py index 601fd93b73a..2d2efda917b 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -35,6 +35,7 @@ import Expect keepGoing = False iceHome = None x64 = False +cpp11 = False preferIPv4 = False serviceDir = None demoErrors = [] @@ -134,10 +135,14 @@ def configurePaths(): libDir = None if not isWin32(): libDir = os.path.join(getIceDir("cpp"), "lib") + if isDarwin() and cpp11: + libDir = os.path.join(libDir, "c++11") # 64-bits binaries are located in a subdirectory with binary # distributions. binDir = os.path.join(getIceDir("cpp"), "bin") + if isDarwin(): + binDir = os.path.join(binDir, "c++11") addenv("PATH", binDir) if iceHome: if isWin32(): @@ -388,6 +393,7 @@ def run(demos, protobufDemos = [], root = False): --continue Keep running when a demo fails." --ice-home=<path> Use the binary distribution from the given path." --x64 Binary distribution is 64-bit." + --cpp11 Binary distribution is C++11." --preferIPv4 Prefer IPv4 stack (java only)." --fast Run an abbreviated version of the demos." --script Generate a script to run the demos. @@ -401,7 +407,7 @@ def run(demos, protobufDemos = [], root = False): try: opts, args = getopt.getopt(sys.argv[1:], "lr:R:", [ "filter=", "rfilter=", "start=", "loop", "fast", "trace=", "debug", "host=", "mode=", - "continue", "ice-home=", "x64", "preferIPv4", "env", "noenv", "script", "protobuf", "service-dir="]) + "continue", "ice-home=", "x64", "preferIPv4", "env", "noenv", "script", "protobuf", "service-dir=", "cpp11"]) except getopt.GetoptError: usage() @@ -421,6 +427,10 @@ def run(demos, protobufDemos = [], root = False): global x64 x64 = True arg += " " + o + elif o == "--cpp11": + global cpp11 + cpp11 = True + arg += " " + o elif o == "--preferIPv4": global preferIPv4 preferIPv4 = True @@ -649,10 +659,10 @@ def addLdPath(libpath): def processCmdLine(): def usage(): - print("usage: " + sys.argv[0] + " --x64 --preferIPv4 --env --noenv --fast --trace=output --debug --host host --mode=[debug|release] --ice-home=<dir> --service-dir=<dir>") + print("usage: " + sys.argv[0] + " --x64 --preferIPv4 --env --noenv --fast --trace=output --debug --host host --mode=[debug|release] --ice-home=<dir> --service-dir=<dir>", "--cpp11") sys.exit(2) try: - opts, args = getopt.getopt(sys.argv[1:], "", ["env", "noenv", "x64", "preferIPv4", "fast", "trace=", "debug", "host=", "mode=", "ice-home=", "--servicedir="]) + opts, args = getopt.getopt(sys.argv[1:], "", ["env", "noenv", "x64", "preferIPv4", "fast", "trace=", "debug", "host=", "mode=", "ice-home=", "--servicedir=", "cpp11"]) except getopt.GetoptError: usage() @@ -660,6 +670,7 @@ def processCmdLine(): global tracefile global buildmode global x64 + global cpp11 global preferIPv4 global debug global host @@ -671,6 +682,7 @@ def processCmdLine(): trace = False buildmode = None x64 = False + cpp11 = False tracefile = None env = False noenv = False @@ -693,6 +705,9 @@ def processCmdLine(): fast = True if o == "--x64": x64 = True + if o == "--cpp11": + + cpp11 = True if o == "--preferIPv4": preferIPv4 = True if o == "--ice-home": |