]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Improve am2cmake procedure:
authorvsr <vsr@opencascade.com>
Thu, 27 Sep 2012 06:15:00 +0000 (06:15 +0000)
committervsr <vsr@opencascade.com>
Thu, 27 Sep 2012 06:15:00 +0000 (06:15 +0000)
- allow forcing am2cmake conversion procedure for separate modules only (with dedicated env variables, e.g. AM2CMAKE_FORCE_KERNEL_GENERATION)
- if top-level CMakeLists.txt file is not am2cmake-generated, stop converting of lower-level files also (instead of checking CMakeLists.txt file separately at each level)

salome_adm/cmake_files/am2cmake.py

index 51bfdceafdf48162e369fc3fb0c5c1d6ca227921..351ac48fcd82e22c734933229590d670648450dc 100644 (file)
@@ -2545,6 +2545,7 @@ if __name__ == "__main__":
     #
     from os import getenv
     from os import walk
+    convert = True # convert files by default
     for root, dirs, files in walk(the_root):
         # --
         # E.A. : Remove 'CVS' in dirs
@@ -2564,8 +2565,9 @@ if __name__ == "__main__":
         # --
         for f in files:
             if f in ["Makefile.am", "Makefile.am.cmake"]:
-                convert = True
-                if getenv("AM2CMAKE_FORCE_GENERATION", "0")=="0":
+                forced = getenv("AM2CMAKE_FORCE_GENERATION", "0")=="1" or \
+                         getenv("AM2CMAKE_FORCE_%s_GENERATION"%module.upper(), "0")=="1"
+                if convert and not forced:
                     # detect if conversion should be done
                     if "CMakeLists.txt" in files:
                         from os.path import join