diff options
Diffstat (limited to 'project/cmake')
-rw-r--r-- | project/cmake/build.py | 4 | ||||
-rw-r--r-- | project/cmake/toolchain.py | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/project/cmake/build.py b/project/cmake/build.py index 4669c5e..9f9bc00 100644 --- a/project/cmake/build.py +++ b/project/cmake/build.py @@ -66,7 +66,7 @@ class GenerationPhase: def _cmake_args(self, toolchain): result = [] - result += toolchain.get_cmake_args() + result += toolchain.cmake_args() result += self.configuration.cmake_args() result += self._cmake_boost_args() result += self.cmake_args @@ -112,7 +112,7 @@ class BuildPhase: result += ['--config', str(self.configuration)] if self.install_dir is not None: result += ['--target', 'install'] - result += ['--'] + toolchain.get_build_args() + result += ['--'] + toolchain.build_system_args() return result def run(self, toolchain): 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 [] |