summaryrefslogtreecommitdiff
path: root/scripts/Util.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-04-25 15:54:43 +0200
committerJose <jose@zeroc.com>2017-04-25 15:54:43 +0200
commit3e0cbc0b519b42cab2bdc68cc6264d42ef72c725 (patch)
treeff4aa762155fb4a13c57dae0043931c51534cf60 /scripts/Util.py
parentMissing dependency in Slice/escape test (diff)
downloadice-3e0cbc0b519b42cab2bdc68cc6264d42ef72c725.tar.bz2
ice-3e0cbc0b519b42cab2bdc68cc6264d42ef72c725.tar.xz
ice-3e0cbc0b519b42cab2bdc68cc6264d42ef72c725.zip
Cache compiler version in test scripts
Diffstat (limited to 'scripts/Util.py')
-rw-r--r--scripts/Util.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index 6693fc94ca9..3a8b0e5a44b 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -225,6 +225,10 @@ class Linux(Platform):
class Windows(Platform):
+ def __init__(self):
+ Platform.__init__(self)
+ self.compiler = ""
+
def getFilters(self, config):
if config.uwp:
return (["Ice/.*", "IceSSL/configuration"],
@@ -252,24 +256,26 @@ class Windows(Platform):
return "Release"
def getCompiler(self):
+ if self.compiler:
+ return self.compiler
if os.environ.get("CPP_COMPILER", "") != "":
- return os.environ["CPP_COMPILER"]
+ self.compiler = os.environ["CPP_COMPILER"]
else:
try:
out = run("cl")
if out.find("Version 16.") != -1:
- return "v100"
+ self.compiler = "v100"
elif out.find("Version 17.") != -1:
- return "v110"
+ self.compiler = "v110"
elif out.find("Version 18.") != -1:
- return "v120"
+ self.compiler = "v120"
elif out.find("Version 19.00.") != -1:
- return "v140"
+ self.compiler = "v140"
elif out.find("Version 19.10.") != -1:
- return "v141"
+ self.compiler = "v141"
except:
pass
- return ""
+ return self.compiler
def getBinSubDir(self, mapping, process, current):
#