From a025e09c61d976fac49918ea81049fba8bb503ae Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 25 Jun 2024 10:31:01 +0200 Subject: [PATCH] spns #42205 [SAT][Windows] support different values for CMAKE_BUILD_TYPE - define set_cmake_build_type --- src/compilation.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/compilation.py b/src/compilation.py index 6d06b35..ac2a556 100644 --- a/src/compilation.py +++ b/src/compilation.py @@ -75,18 +75,19 @@ class Builder: # set cmake build type def set_cmake_build_type(self, build_type): - if build_type.lower() in ['debug', 'relwithdebinfo', 'release', 'minsizerel']: - if build_type.lower() == 'debug': + btype = build_type.lower() + if btype in ['debug', 'relwithdebinfo', 'release', 'minsizerel']: + if btype == 'debug': self.cmake_build_type = 'Debug' self.debug_mode = True - elif build_type.lower() == 'relwithdebinfo': + elif btype == 'relwithdebinfo': self.cmake_build_type = 'RelWithDebInfo' - elif build_type.lower() == 'release': + elif btype == 'release': self.cmake_build_type = 'Release' - elif build_type.lower() == 'minsizerel': + elif btype == 'minsizerel': self.cmake_build_type = 'MinSizeRel' - else: - raise src.SatException("Unknown cmake build mode: {}. Supported values are: Debug, RelWithDebInfo, Release or MinSizeRel".format(build_type)) + else: + raise src.SatException("Unknown cmake build mode: {}. Supported values are: Debug, RelWithDebInfo, Release or MinSizeRel".format(build_type)) return # Shortcut method to log in log file. -- 2.39.2