diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 18:52:49 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 18:52:49 +0300 |
commit | 8b3d24461ff1946fee8f599bfdc77453691f388d (patch) | |
tree | 82439782d9127464de224c71dc343dfbecb0d1c6 /project/cmake/toolchain.py | |
parent | project.boost.build: refactoring & cleanup (diff) | |
download | cmake-common-8b3d24461ff1946fee8f599bfdc77453691f388d.tar.gz cmake-common-8b3d24461ff1946fee8f599bfdc77453691f388d.zip |
project: minor refactoring
Diffstat (limited to '')
-rw-r--r-- | project/cmake/toolchain.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/project/cmake/toolchain.py b/project/cmake/toolchain.py index 22f99df..3311d04 100644 --- a/project/cmake/toolchain.py +++ b/project/cmake/toolchain.py @@ -16,11 +16,11 @@ from project.toolchain import ToolchainType class Toolchain(abc.ABC): @abc.abstractmethod - def get_cmake_args(self): + def cmake_args(self): pass @abc.abstractmethod - def get_build_args(self): + def build_system_args(self): pass @staticmethod @@ -55,10 +55,10 @@ class Toolchain(abc.ABC): class Auto(Toolchain): - def get_cmake_args(self): + def cmake_args(self): return [] - def get_build_args(self): + def build_system_args(self): return [] @@ -66,12 +66,12 @@ class MSVC(Auto): def __init__(self, platform): self.platform = platform - def get_cmake_args(self): + def cmake_args(self): # This doesn't actually specify the generator of course, but I don't # want to implement VS detection logic. return ['-A', self.platform.msvc_arch()] - def get_build_args(self): + def build_system_args(self): return ['/m'] @@ -99,7 +99,7 @@ class Makefile(Toolchain): file.write(contents) return cls(path) - def get_cmake_args(self): + def cmake_args(self): return [ '-D', f'CMAKE_TOOLCHAIN_FILE={self.path}', # The Visual Studio generator is the default on Windows, override @@ -107,7 +107,7 @@ class Makefile(Toolchain): '-G', self._get_makefile_generator(), ] - def get_build_args(self): + def build_system_args(self): return [] |