Skip to content

Commit

Permalink
Update cmake to 3.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
UK992 committed Apr 11, 2017
1 parent 9b35fd9 commit e3654e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion python/servo/bootstrap.py
Expand Up @@ -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
Expand Down Expand Up @@ -204,10 +205,19 @@ def version(package):
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)):
Expand Down
2 changes: 1 addition & 1 deletion python/servo/packages.py
Expand Up @@ -18,7 +18,7 @@
])

WINDOWS_MSVC = {
"cmake": "3.6.1",
"cmake": "3.7.2",
"moztools": "0.0.1-5",
"ninja": "1.7.1",
"openssl": "1.1.0e-vs2015",
Expand Down

0 comments on commit e3654e1

Please sign in to comment.