Move logic from travis.yml to a Python script

This commit is contained in:
Victor Zverovich
2015-02-12 15:34:38 -08:00
parent dd2e8b98de
commit 2ced92529d
2 changed files with 28 additions and 22 deletions

13
support/build.py Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python
# Build the project on AppVeyor.
from subprocess import check_call
import os
env = os.environ
build = env['BUILD']
if build == 'mingw':
# Remove path to Git bin directory from $PATH because it breaks MinGW config.
env['PATH'] = env['PATH'].replace(r'C:\Program Files (x86)\Git\bin', '')
generator = ['-GMinGW Makefiles']
check_call(['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' + env['CONFIG']] + generator, env=env)