]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
spns #42205 [SAT][Windows] support different values for CMAKE_BUILD_TYPE - define...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 25 Jun 2024 08:31:01 +0000 (10:31 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 25 Jun 2024 08:31:01 +0000 (10:31 +0200)
src/compilation.py

index 6d06b352875d8985f6df5c14f103c8903074406e..ac2a55696054ecda2bd9aa36894f3b8beb7eedbf 100644 (file)
@@ -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.