- some workarounds for MinGW Signed-off-by: SSE4 <tomskside@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/appveyor.yml b/appveyor.yml
index fa23ce1..aab762f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -4,6 +4,7 @@ environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: "MinGW Makefiles"
+ CMAKE_MAKE_PROGRAM: "C:\\MinGW\\bin\\mingw32-make.exe"
CC: "C:\\MinGW\\bin\\gcc.exe"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMAKE_GENERATOR: "Visual Studio 12 2013"
diff --git a/build.py b/build.py
index 103c931..0d13348 100644
--- a/build.py
+++ b/build.py
@@ -10,9 +10,22 @@ def run(command):
if 0 != status:
sys.exit(command)
+def remove_sh_from_path():
+ path = os.environ["PATH"]
+ path = path.split(os.pathsep)
+ for entry in path:
+ if os.path.isfile(os.path.join(entry, "sh.exe")):
+ path.remove(entry)
+ path = os.pathsep.join(path)
+ os.environ["PATH"] = path
+
def main():
+ remove_sh_from_path()
generator = os.environ["CMAKE_GENERATOR"]
- run('cmake . -G "%s"' % generator)
+ command = 'cmake . -G "%s"' % generator
+ if "CMAKE_MAKE_PROGRAM" in os.environ:
+ command += "-D%s" % os.environ["CMAKE_MAKE_PROGRAM"]
+ run(command)
run('cmake --build . --config Release')
if __name__ == '__main__':