From e539c39491cc698a3fd37becce5a5e332fec802d Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 20 Mar 2012 16:03:08 +0000 Subject: [PATCH] Cmakization of MED. --- salome_adm/cmake_files/am2cmake.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index f5b921d6c..33fcc0096 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -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 -- 2.39.2