]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Cmakization of MED.
authorageay <ageay>
Tue, 20 Mar 2012 16:03:08 +0000 (16:03 +0000)
committerageay <ageay>
Tue, 20 Mar 2012 16:03:08 +0000 (16:03 +0000)
salome_adm/cmake_files/am2cmake.py

index f5b921d6c7909f55c3f8f30bde8be81eae887ce6..33fcc00965b15ed2f2d2ca834e47f13f5d7b4420 100644 (file)
@@ -2546,6 +2546,7 @@ if __name__ == "__main__":
     #
     nok = 0
     #
+    from os import getenv
     from os import walk
     for root, dirs, files in walk(the_root):
         # --
@@ -2567,20 +2568,22 @@ if __name__ == "__main__":
         for f in files:
             if f in ["Makefile.am", "Makefile.am.cmake"]:
                 convert = True
-                if "CMakeLists.txt" in files:
-                    from os.path import join
-                    ff = open(join(root, "CMakeLists.txt"))
-                    content = ff.read()
-                    import sys
-                    sys.exit(-1)
-                    ff.close()
-                    if content.find("generated by am2cmake") == -1:
-                        convert = False
+                if getenv("AM2CMAKE_FORCE_GENERATION")=="0":
+                    if "CMakeLists.txt" in files:
+                        from os.path import join
+                        ff = open(join(root, "CMakeLists.txt"))
+                        content = ff.read()
+                        import sys
+                        sys.exit(-1)
+                        ff.close()
+                        if content.find("generated by am2cmake") == -1:
+                            convert = False
+                            pass
+                        pass
+                    if convert:
+                        convertAmFile(the_root, root, dirs, files, f, module)
+                        nok += 1
                         pass
-                    pass
-                if convert:
-                    convertAmFile(the_root, root, dirs, files, f, module)
-                    nok += 1
                     pass
                 pass
             pass