From 39902041e7671a94abcf691fa4a769b5cb4fc4fb Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 30 Mar 2020 02:34:03 +0300 Subject: project.cmake: make it --platform aware --- project/ci/appveyor/cmake.py | 3 ++- project/ci/travis/cmake.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'project/ci') diff --git a/project/ci/appveyor/cmake.py b/project/ci/appveyor/cmake.py index c3d55d0..c1b851c 100644 --- a/project/ci/appveyor/cmake.py +++ b/project/ci/appveyor/cmake.py @@ -114,12 +114,13 @@ def build_appveyor(argv=None): args = _parse_args(argv) _check_appveyor() - cmake_args = ['-G', str(_get_generator()), '-A', str(_get_platform())] + cmake_args = ['-G', str(_get_generator())] cmake_args += args.cmake_args params = BuildParameters(_get_src_dir(), build_dir=_get_build_dir(), install_dir=args.install_dir, + platform=_get_platform(), configuration=_get_configuration(), cmake_args=cmake_args) build(params) diff --git a/project/ci/travis/cmake.py b/project/ci/travis/cmake.py index 1d6eed4..47177bc 100644 --- a/project/ci/travis/cmake.py +++ b/project/ci/travis/cmake.py @@ -19,6 +19,7 @@ import sys from project.cmake.build import BuildParameters, build from project.configuration import Configuration +from project.platform import Platform from project.utils import setup_logging @@ -41,6 +42,10 @@ def _get_build_dir(): return os.path.join(_env('HOME'), 'build') +def _get_platform(): + return Platform.parse(_env('platform')) + + def _get_configuration(): return Configuration.parse(_env('configuration')) @@ -68,6 +73,7 @@ def build_travis(argv=None): params = BuildParameters(_get_src_dir(), build_dir=_get_build_dir(), install_dir=args.install_dir, + platform=_get_platform(), configuration=_get_configuration(), cmake_args=args.cmake_args) build(params) -- cgit v1.2.3