diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-29 11:02:52 +0000 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-29 11:45:02 +0000 |
commit | 4264b4aff4b477ed060e3d926de6a7e10fa79871 (patch) | |
tree | 2ad792ce5fac28947fbb347126d0803ba05c770f /project/ci/travis/cmake.py | |
parent | project.cmake: factor out common utils (diff) | |
download | cmake-common-4264b4aff4b477ed060e3d926de6a7e10fa79871.tar.gz cmake-common-4264b4aff4b477ed060e3d926de6a7e10fa79871.zip |
project.cmake: insignificant refactoring
Diffstat (limited to 'project/ci/travis/cmake.py')
-rw-r--r-- | project/ci/travis/cmake.py | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/project/ci/travis/cmake.py b/project/ci/travis/cmake.py index cb96941..c7c61ca 100644 --- a/project/ci/travis/cmake.py +++ b/project/ci/travis/cmake.py @@ -17,7 +17,8 @@ import os import os.path import sys -from project.cmake.build import build +from project.cmake.build import BuildParameters, build +from project.configuration import Configuration import project.utils @@ -41,7 +42,7 @@ def _get_build_dir(): def _get_configuration(): - return _env('configuration') + return Configuration.parse(_env('configuration')) def _parse_args(argv=None): @@ -64,19 +65,12 @@ def build_travis(argv=None): args = _parse_args(argv) _check_travis() - travis_argv = [ - '--build', _get_build_dir(), - '--configuration', _get_configuration(), - ] - if args.install_dir is not None: - travis_argv += [ - '--install', args.install_dir, - ] - travis_argv += [ - '--', - _get_src_dir(), - ] - build(travis_argv + args.cmake_args) + params = BuildParameters(_get_src_dir(), + build_dir=_get_build_dir(), + install_dir=args.install_dir, + configuration=_get_configuration(), + cmake_args=args.cmake_args) + build(params) def main(argv=None): |