Commit 732284a31e9486b27231dee18e7361e15725fd6e

SSE4 2019-02-22T04:27:39

- add vcvars Signed-off-by: SSE4 <tomskside@gmail.com>

diff --git a/appveyor.yml b/appveyor.yml
index 9bf6c36..c1a0cfa 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -9,6 +9,7 @@ environment:
         - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
           CMAKE_GENERATOR: "Ninja"
           CC: "C:\\Program Files\\LLVM\\bin\\clang-cl.exe"
+          VCVARS: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
         - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
           CMAKE_GENERATOR: "Visual Studio 12 2013"
         - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
diff --git a/build.py b/build.py
index 4b485fe..b8f201c 100644
--- a/build.py
+++ b/build.py
@@ -14,6 +14,8 @@ def show_file(filename):
             print(contents)
 
 def run(command):
+    if "VCVARS" in os.environ:
+        command = 'call "%s" amd64" % os.environ["VCVARS"] + command
     status = os.system(command)
     if 0 != status:
         show_file(os.path.join("CMakeFiles", "CMakeOutput.log"))