From 8f4d2e9e3085af7b3b72041d7a237c738b55c304 Mon Sep 17 00:00:00 2001 From: Oleksandr Kunichik Date: Tue, 20 Oct 2020 15:28:16 +0300 Subject: [PATCH] Code generator: rewrite or create a new no-moc file (#315) --- codegen/facelift/facelift-codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/facelift/facelift-codegen.py b/codegen/facelift/facelift-codegen.py index 3258a215..612c2ab5 100755 --- a/codegen/facelift/facelift-codegen.py +++ b/codegen/facelift/facelift-codegen.py @@ -432,7 +432,7 @@ def run_generation(input, output, dependency, all, noMocFilePath, noMocListFile) def generate(input, output, dependency, all, no_moc_file_path): """Takes several files or directories as input and generates the code in the given output directory.""" - with open('{}/no_moc.cmake'.format(output), 'a+') as noMocListFile: + with open('{}/no_moc.cmake'.format(output), 'w') as noMocListFile: noMocListFile.write('set(HEADERS_NO_MOC_GENERATED\n') run_generation(input, output, dependency, all, no_moc_file_path, noMocListFile) noMocListFile.write(')\n')