diff options
Diffstat (limited to 'project/configuration.py')
| -rw-r--r-- | project/configuration.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/project/configuration.py b/project/configuration.py index 19a4b3b..ea78726 100644 --- a/project/configuration.py +++ b/project/configuration.py @@ -29,7 +29,7 @@ class Configuration(Enum): except ValueError as e: raise argparse.ArgumentTypeError(f'invalid configuration: {s}') from e - def variant(self): + def b2_variant(self): '''Roughly maps CMake's CMAKE_BUILD_TYPE to Boost's variant. AFAIK, Boost only supports debug/release, MinSizeRel and RelWithDebInfo @@ -38,25 +38,11 @@ class Configuration(Enum): MinSizeRel/RelWithDebInfo. ''' if self in (Configuration.MINSIZEREL, Configuration.RELWITHDEBINFO): - return Configuration.RELEASE.variant() + return Configuration.RELEASE.b2_variant() return str(self).lower() - def b2_variant(self): - return [f'variant={self.variant()}'] - def b2_args(self): - args = [] - args += self.b2_variant() - return args - - def build_type(self): - '''Maps to CMAKE_BUILD_TYPE.''' - return str(self) - - def cmake_build_type(self): - return [f'-DCMAKE_BUILD_TYPE={self.build_type()}'] + return [f'variant={self.b2_variant()}'] def cmake_args(self): - args = [] - args += self.cmake_build_type() - return args + return [f'-DCMAKE_BUILD_TYPE={self}'] |
