mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-26 12:35:32 +00:00
Fix CMake installation and enable biicode build
This commit is contained in:
parent
0dd1f19281
commit
a6864a7264
@ -20,7 +20,7 @@ script:
|
|||||||
- make -j4
|
- make -j4
|
||||||
- CTEST_OUTPUT_ON_FAILURE=1 make test
|
- CTEST_OUTPUT_ON_FAILURE=1 make test
|
||||||
- cd .. && rm -rf build/
|
- cd .. && rm -rf build/
|
||||||
# - support/biicode-build.py
|
- support/biicode-build.py
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- cat Testing/Temporary/LastTest.log
|
- cat Testing/Temporary/LastTest.log
|
||||||
|
@ -6,10 +6,12 @@ from download import Downloader
|
|||||||
from subprocess import check_call
|
from subprocess import check_call
|
||||||
|
|
||||||
os_name = os.environ['TRAVIS_OS_NAME']
|
os_name = os.environ['TRAVIS_OS_NAME']
|
||||||
|
cmake_dir = 'cmake-dir'
|
||||||
if os_name == 'linux':
|
if os_name == 'linux':
|
||||||
# Install newer version of CMake.
|
# Install newer version of CMake.
|
||||||
bootstrap.install_cmake(
|
bootstrap.install_cmake(
|
||||||
'cmake-3.1.1-Linux-i386.tar.gz', check_installed=False, download_dir=None)
|
'cmake-3.1.1-Linux-i386.tar.gz', check_installed=False,
|
||||||
|
download_dir=None, install_dir=cmake_dir, add_to_path=False)
|
||||||
with Downloader().download('http://www.biicode.com/downloads/latest/ubuntu64') as f:
|
with Downloader().download('http://www.biicode.com/downloads/latest/ubuntu64') as f:
|
||||||
check_call(['sudo', 'dpkg', '-i', f])
|
check_call(['sudo', 'dpkg', '-i', f])
|
||||||
elif os_name == 'osx':
|
elif os_name == 'osx':
|
||||||
@ -20,7 +22,9 @@ project_dir = 'biicode_project'
|
|||||||
check_call(['bii', 'init', project_dir])
|
check_call(['bii', 'init', project_dir])
|
||||||
cppformat_dir = os.path.join(project_dir, 'blocks/vitaut/cppformat')
|
cppformat_dir = os.path.join(project_dir, 'blocks/vitaut/cppformat')
|
||||||
shutil.copytree('.', cppformat_dir,
|
shutil.copytree('.', cppformat_dir,
|
||||||
ignore=shutil.ignore_patterns('biicode_project'))
|
ignore=shutil.ignore_patterns('biicode_project', cmake_dir))
|
||||||
for f in glob.glob('support/biicode/*'):
|
for f in glob.glob('support/biicode/*'):
|
||||||
shutil.copy(f, cppformat_dir)
|
shutil.copy(f, cppformat_dir)
|
||||||
check_call(['bii', 'cpp:build'], cwd=project_dir)
|
env = os.environ.copy()
|
||||||
|
env['PATH'] = '../{}:{}'.format(cmake_dir, env['PATH'])
|
||||||
|
check_call(['bii', 'cpp:build'], cwd=project_dir, env=env)
|
||||||
|
@ -94,7 +94,7 @@ def install_cmake(package, **kwargs):
|
|||||||
if platform.system() == 'Darwin':
|
if platform.system() == 'Darwin':
|
||||||
dir = glob.glob(os.path.join(dir, 'CMake*.app', 'Contents'))[0]
|
dir = glob.glob(os.path.join(dir, 'CMake*.app', 'Contents'))[0]
|
||||||
cmake_path = os.path.join(dir, 'bin', 'cmake')
|
cmake_path = os.path.join(dir, 'bin', 'cmake')
|
||||||
if install_dir != '.':
|
if install_dir != '.' and kwargs.get('add_to_path', True):
|
||||||
add_to_path(cmake_path)
|
add_to_path(cmake_path)
|
||||||
return cmake_path
|
return cmake_path
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user