aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap.py
diff options
context:
space:
mode:
authorUK992 <urbankrajnc92@gmail.com>2017-04-11 23:29:06 +0200
committerUK992 <urbankrajnc92@gmail.com>2017-04-11 23:34:13 +0200
commite3654e14c58d320379e15b6b39f9b8b1ab766148 (patch)
treee107888af4eb81785806d080c6325d7586fedbaf /python/servo/bootstrap.py
parent9b35fd9472923c669a33ae51808068f63cb4db83 (diff)
downloadservo-e3654e14c58d320379e15b6b39f9b8b1ab766148.tar.gz
servo-e3654e14c58d320379e15b6b39f9b8b1ab766148.zip
Update cmake to 3.7.2
Diffstat (limited to 'python/servo/bootstrap.py')
-rw-r--r--python/servo/bootstrap.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py
index 72867fcf155..35be5c67b92 100644
--- a/python/servo/bootstrap.py
+++ b/python/servo/bootstrap.py
@@ -5,6 +5,7 @@
from __future__ import absolute_import, print_function
from distutils.spawn import find_executable
+from distutils.version import StrictVersion
import json
import os
import platform
@@ -204,10 +205,19 @@ def windows_msvc(context, force=False):
def package_dir(package):
return os.path.join(deps_dir, package, version(package))
+ def check_cmake(version):
+ cmake_path = find_executable("cmake")
+ if cmake_path:
+ cmake = subprocess.Popen([cmake_path, "--version"], stdout=PIPE)
+ cmake_version = cmake.stdout.read().splitlines()[0].replace("cmake version ", "")
+ if StrictVersion(cmake_version) >= StrictVersion(version):
+ return True
+ return False
+
to_install = {}
for package in packages.WINDOWS_MSVC:
# Don't install CMake if it already exists in PATH
- if package == "cmake" and find_executable(package):
+ if package == "cmake" and check_cmake(version("cmake")):
continue
if not os.path.isdir(package_dir(package)):