content = '\n'.join(lines)
# --
- self.content = content
+ self.content = "# ---------------------------------------------------------------------\n"
+ self.content += "# This file was automatically generated by am2cmake (erwan.adam@cea.fr)\n"
+ self.content += "# ---------------------------------------------------------------------\n"
+ self.content += content
# --
return
# --
for f in files:
if f in ["Makefile.am", "Makefile.am.cmake"]:
- convertAmFile(the_root, root, dirs, files, f, module)
- nok += 1
+ 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
+ pass
+ pass
+ if convert:
+ convertAmFile(the_root, root, dirs, files, f, module)
+ nok += 1
+ pass
pass
pass
pass