Salome HOME
correction bug (dans dev pour sat #12087) break au lieu de continue : seul le premier...
[tools/sat.git] / src / compilation.py
index d46a2171a149e3a8bc24234453594aaf0a5b91ea..f8a06303c37ee0cedbcb854a12b0c2c93f085ae2 100644 (file)
@@ -51,6 +51,9 @@ class Builder:
         self.debug_mode = False
         if "debug" in self.product_info and self.product_info.debug == "yes":
             self.debug_mode = True
+        self.verbose_mode = False
+        if "verbose" in self.product_info and self.product_info.verbose == "yes":
+            self.verbose_mode = True
 
     ##
     # Shortcut method to log in log file.
@@ -118,7 +121,11 @@ class Builder:
             cmake_option += " -DCMAKE_BUILD_TYPE=Debug"
         else :
             cmake_option += " -DCMAKE_BUILD_TYPE=Release"
-        
+
+        # add verbose option if specified in application for this product.
+        if self.verbose_mode:
+            cmake_option += " -DCMAKE_VERBOSE_MAKEFILE=ON"
+
         # In case CMAKE_GENERATOR is defined in environment, 
         # use it in spite of automatically detect it
         if 'cmake_generator' in self.config.APPLICATION:
@@ -429,6 +436,10 @@ CC=\\"hack_libtool\\"%g" libtool'''
         self.build_environ.set("DIST_VERSION", self.config.VARS.dist_version)
         self.build_environ.set("DIST", self.config.VARS.dist)
         self.build_environ.set("VERSION", self.product_info.version)
+        # if product is in hpc mode, set SAT_HPC to 1 
+        # in order for the compilation script to take it into account
+        if src.product.product_is_hpc(self.product_info):
+            self.build_environ.set("SAT_HPC", "1")
 
     def do_batch_script_build(self, script, nb_proc):