diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-20 18:08:30 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-20 18:08:30 +0300 |
commit | fb12e2d2bba3d74d42108795bb682f1271f802c3 (patch) | |
tree | a3243564e1043a07228983aa93785ff828171176 /project | |
parent | workflows: fail-fast (diff) | |
download | cmake-common-fb12e2d2bba3d74d42108795bb682f1271f802c3.tar.gz cmake-common-fb12e2d2bba3d74d42108795bb682f1271f802c3.zip |
project: minor refactoring
Diffstat (limited to 'project')
-rw-r--r-- | project/boost/toolchain.py | 3 | ||||
-rw-r--r-- | project/cmake/toolchain.py | 2 | ||||
-rw-r--r-- | 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 |