Lines Matching refs:write
62 out.write('set("')
63 out.write(CMakeStringEscape(variable_name))
64 out.write('" "')
65 out.write(CMakeStringEscape(value))
66 out.write('")\n')
75 out.write('list(APPEND "')
76 out.write(CMakeStringEscape(variable_name))
77 out.write('"\n "')
78 out.write('"\n "'.join([CMakeStringEscape(value) for value in values]))
79 out.write('")\n')
84 output.write('set_source_files_properties(')
86 output.write(' PROPERTIES ')
87 output.write(property_name)
88 output.write(' "')
90 output.write(CMakeStringEscape(value))
91 output.write(sep)
92 output.write('")\n')
97 out.write('set_target_properties("${target}" PROPERTIES ')
98 out.write(property_name)
99 out.write(' "')
101 out.write(CMakeStringEscape(value))
102 out.write(sep)
103 out.write('")\n')
108 output.write(prepend)
109 output.write('${')
110 output.write(variable_name)
111 output.write('}')
247 out.write('add_custom_command(OUTPUT ')
249 out.write('\n')
252 out.write(' COMMAND ${CMAKE_COMMAND} -E make_directory "')
253 out.write('" "'.join(map(CMakeStringEscape, output_directories)))
254 out.write('"\n')
258 out.write(' COMMAND python "')
259 out.write(CMakeStringEscape(project.GetAbsolutePath(script)))
260 out.write('"')
262 out.write('\n "')
263 out.write('"\n "'.join(map(CMakeStringEscape, arguments)))
264 out.write('"')
265 out.write('\n')
267 out.write(' DEPENDS ')
270 out.write('\n')
274 out.write(' WORKING_DIRECTORY "')
275 out.write(CMakeStringEscape(project.build_path))
276 out.write('"\n')
278 out.write(' COMMENT "Action: ${target}"\n')
280 out.write(' VERBATIM)\n')
316 out.write('add_custom_command(OUTPUT ')
318 out.write('\n')
321 out.write(' COMMAND ${CMAKE_COMMAND} -E make_directory "')
322 out.write('" "'.join(map(CMakeStringEscape, output_directories)))
323 out.write('"\n')
328 out.write(' COMMAND python "')
329 out.write(CMakeStringEscape(project.GetAbsolutePath(script)))
330 out.write('"')
332 out.write('\n "')
334 out.write('"\n "'.join(map(CMakeStringEscape, map(expand,arguments))))
335 out.write('"')
336 out.write('\n')
338 out.write(' DEPENDS')
341 out.write(' "')
342 out.write(CMakeStringEscape(source_abs_path))
343 out.write('"\n')
347 out.write(' WORKING_DIRECTORY "')
348 out.write(CMakeStringEscape(project.build_path))
349 out.write('"\n')
351 out.write(' COMMENT "Action ${target} on ')
352 out.write(CMakeStringEscape(source_abs_path))
353 out.write('"\n')
355 out.write(' VERBATIM)\n')
372 out.write('add_custom_command(OUTPUT ')
374 out.write('\n')
382 out.write(' COMMAND ${CMAKE_COMMAND} -E copy "')
384 out.write(' COMMAND ${CMAKE_COMMAND} -E copy_directory "')
385 out.write(abs_src_path)
386 out.write('" "')
387 out.write(CMakeStringEscape(dst))
388 out.write('"\n')
390 out.write(' DEPENDS ')
393 out.write('\n')
395 out.write(' WORKING_DIRECTORY "')
396 out.write(CMakeStringEscape(project.build_path))
397 out.write('"\n')
399 out.write(' COMMENT "Copy ${target}"\n')
401 out.write(' VERBATIM)\n')
427 out.write('set_property(TARGET "${target}" ')
428 out.write('APPEND PROPERTY INCLUDE_DIRECTORIES')
430 out.write('\n "')
431 out.write(project.GetAbsolutePath(include_dir))
432 out.write('"')
433 out.write(')\n')
537 out.write('\n#')
538 out.write(target.gn_name)
539 out.write('\n')
558 out.write(target.cmake_type.command)
559 out.write('("${target}"')
561 out.write(' ')
562 out.write(target.cmake_type.modifier)
566 out.write(' DEPENDS')
569 out.write(')\n')
601 out.write('add_dependencies("${target}"')
603 out.write('\n "')
604 out.write(nonlibrary)
605 out.write('"')
606 out.write(')\n')
625 out.write('find_library("')
626 out.write(CMakeStringEscape(system_library))
627 out.write('" "')
628 out.write(CMakeStringEscape(external_library))
629 out.write('"')
631 out.write(' PATHS "')
633 out.write('"')
634 out.write(')\n')
636 out.write('target_link_libraries("${target}"')
638 out.write('\n "')
639 out.write(CMakeStringEscape(library))
640 out.write('"')
643 out.write('"')
644 out.write(')\n')
650 out.write('# Generated by gn_to_cmake.py.\n')
651 out.write('cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n')
652 out.write('cmake_policy(VERSION 2.8.8)\n\n')
654 out.write('file(WRITE "')
655 out.write(CMakeStringEscape(posixpath.join(project.build_path, "empty.cpp")))
656 out.write('")\n')
662 out.write('execute_process(COMMAND\n')
663 out.write(' ninja -C "')
664 out.write(CMakeStringEscape(project.build_path))
665 out.write('" build.ninja\n')
666 out.write(' RESULT_VARIABLE ninja_result)\n')
667 out.write('if (ninja_result)\n')
668 out.write(' message(WARNING ')
669 out.write('"Regeneration failed running ninja: ${ninja_result}")\n')
670 out.write('endif()\n')
672 out.write('include("')
673 out.write(CMakeStringEscape(extName))
674 out.write('")\n')
678 out.write('# Generated by gn_to_cmake.py.\n')
679 out.write('cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n')
680 out.write('cmake_policy(VERSION 2.8.8)\n')
684 out.write('enable_language(ASM)\n\n')
694 out.write('file(READ "')
696 out.write(CMakeStringEscape(gn_deps_file))
697 out.write('" "gn_deps_string" OFFSET ')
698 out.write(str(len('build.ninja: ')))
699 out.write(')\n')
702 out.write('string(REPLACE " " ";" "gn_deps" ${gn_deps_string})\n')
703 out.write('foreach("gn_dep" ${gn_deps})\n')
704 out.write(' configure_file("')
705 out.write(CMakeStringEscape(project.build_path))
706 out.write('${gn_dep}" "CMakeLists.devnull" COPYONLY)\n')
707 out.write('endforeach("gn_dep")\n')
709 out.write('list(APPEND other_deps "')
710 out.write(CMakeStringEscape(os.path.abspath(__file__)))
711 out.write('")\n')
712 out.write('foreach("other_dep" ${other_deps})\n')
713 out.write(' configure_file("${other_dep}" "CMakeLists.devnull" COPYONLY)\n')
714 out.write('endforeach("other_dep")\n')
717 out.write('\n')