do not modify files if nothing changed
@@ -98,11 +98,11 @@ def write_generators(conanfile, path, output):
for k, v in content.items():
v = normalize(v)
output.info("Generator %s created %s" % (generator_name, k))
- save(join(path, k), v)
+ save(join(path, k), v, only_if_modified=True)
else:
content = normalize(content)
output.info("Generator %s created %s" % (generator_name, generator.filename))
- save(join(path, generator.filename), content)
+ save(join(path, generator.filename), content, only_if_modified=True)
except Exception as e:
if get_env("CONAN_VERBOSE_TRACEBACK", False):
output.error(traceback.format_exc())
