fmt/support/build.py

15 lines
483 B
Python
Raw Normal View History

#!/usr/bin/env python
# Build the project on AppVeyor.
from subprocess import check_call
import os
env = os.environ
build = env['BUILD']
2015-02-12 23:41:30 +00:00
cmake_command = ['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' + env['CONFIG']]
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', '')
2015-02-12 23:41:30 +00:00
cmake_command.append('-GMinGW Makefiles')
check_call(cmake_command, env=env)