diff options
author | Jose <jose@zeroc.com> | 2012-12-18 23:19:18 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-12-18 23:19:18 +0100 |
commit | 6d029f690f85060ea7f30a3255b49302235510df (patch) | |
tree | 3afac10639c82cf73354514660b2d4083e1e8234 /scripts/TestUtil.py | |
parent | Fixed (ICE-5142) - IceGridGUI manual notes to run when build without proguard (diff) | |
download | ice-6d029f690f85060ea7f30a3255b49302235510df.tar.bz2 ice-6d029f690f85060ea7f30a3255b49302235510df.tar.xz ice-6d029f690f85060ea7f30a3255b49302235510df.zip |
Demo & test script fixes for CPP_COMPILER detection
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-x | scripts/TestUtil.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 389a97f7d39..192a41df5aa 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -90,6 +90,24 @@ def getCppCompiler(): else: config = open(os.path.join(toplevel, "cpp", "config", "Make.rules.mak"), "r") compiler = re.search("CPP_COMPILER[\t\s]*= ([A-Z0-9]*)", config.read()).group(1) + if compiler != "VC90" and compiler != "VC100" and compiler != "VC110": + compiler = "" + + if compiler == "": + p = subprocess.Popen("cl", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) + if not p or not p.stdout: + print("Cannot detect C++ compiler") + sys.exit(1) + l = p.stdout.readline().decode("utf-8").strip() + if l.find("Version 15") != -1: + compiler = "VC90" + elif l.find("Version 16") != -1: + compiler = "VC100" + elif l.find("Version 17") != -1: + compiler = "VC110" + else: + print("Cannot detect C++ compiler") + sys.exit(1) return compiler def isMINGW(): @@ -108,7 +126,7 @@ def isVS2012(): if not isWin32(): return False compiler = getCppCompiler() - return compiler == "VC110" or compiler == "VC110_EXPRESS" + return compiler == "VC110" # # The PHP interpreter is called "php5" on some platforms (e.g., SLES). |