From fb12e2d2bba3d74d42108795bb682f1271f802c3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 20 Mar 2021 18:08:30 +0300 Subject: project: minor refactoring --- project/boost/toolchain.py | 3 +-- project/cmake/toolchain.py | 2 +- project/platform.py | 9 --------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/project/boost/toolchain.py b/project/boost/toolchain.py index 5422a62..f79cc17 100644 --- a/project/boost/toolchain.py +++ b/project/boost/toolchain.py @@ -234,8 +234,7 @@ class ConfigFile(Toolchain): def b2_args(self, configuration): # All the required options and the toolset definition should be in the # user configuration file. - args = [] - args += super().b2_args(configuration) + args = super().b2_args(configuration) args.append(f'--user-config={self.config_path}') args += self.toolset.b2_args() return args diff --git a/project/cmake/toolchain.py b/project/cmake/toolchain.py index 0e68738..22f99df 100644 --- a/project/cmake/toolchain.py +++ b/project/cmake/toolchain.py @@ -69,7 +69,7 @@ class MSVC(Auto): def get_cmake_args(self): # This doesn't actually specify the generator of course, but I don't # want to implement VS detection logic. - return self.platform.cmake_msvc_args() + return ['-A', self.platform.msvc_arch()] def get_build_args(self): return ['/m'] diff --git a/project/platform.py b/project/platform.py index b19c93a..92890d0 100644 --- a/project/platform.py +++ b/project/platform.py @@ -135,12 +135,3 @@ set(CMAKE_CXX_FLAGS -m{address_model}) if self is Platform.X64: return 'x64' raise NotImplementedError(f'unsupported platform: {self}') - - def cmake_msvc_arch(self): - return ['-A', self.msvc_arch()] - - def cmake_msvc_args(self): - # When using the MSVC toolset, pass the appropriate -A flag. - args = [] - args += self.cmake_msvc_arch() - return args -- cgit v1.2.3