From 4264b4aff4b477ed060e3d926de6a7e10fa79871 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 29 Mar 2020 11:02:52 +0000 Subject: project.cmake: insignificant refactoring --- project/ci/travis/cmake.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'project/ci/travis') 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): -- cgit v1.2.3