parameters: (self, output_path, enabled_optional_components)
docstring: write_cmake_exports_fragment(output_path) -> None
  
          Generate a CMake fragment which includes LLVMBuild library
          dependencies expressed similarly to how CMake would write
          them via install(EXPORT).
docstring_summary: write_cmake_exports_fragment(output_path) -> None
docstring_tokens: write_cmake_exports_fragment ( output_path ) - > None
function: def write_cmake_exports_fragment(self, output_path, enabled_optional_components):
          """
          write_cmake_exports_fragment(output_path) -> None
  
          Generate a CMake fragment which includes LLVMBuild library
          dependencies expressed similarly to how CMake would write
          them via install(EXPORT).
          """
  
          dependencies = list(self.get_fragment_dependencies())
  
          # Write out the CMake exports fragment.
          make_install_dir(os.path.dirname(output_path))
          f = open(output_path, 'w')
  
          f.write("""\
  # Explicit library dependency information.
  #
  # The following property assignments tell CMake about link
  # dependencies of libraries imported from LLVM.
  """)
          self.foreach_cmake_library(
              lambda ci:
                f.write("""\
  set_property(TARGET %s PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES %s)\n""" % (
                  ci.get_prefixed_library_name(), " ".join(sorted(
                       dep.get_prefixed_library_name()
                       for dep in self.get_required_libraries_for_component(ci)))))
              ,
              enabled_optional_components,
              skip_disabled = True,
              skip_not_installed = True # Do not export internal libraries like gtest
              )
  
          f.close()
function_tokens: def write_cmake_exports_fragment ( self , output_path , enabled_optional_components ) : dependencies = list ( self . get_fragment_dependencies ( ) ) # Write out the CMake exports fragment. make_install_dir ( os . path . dirname ( output_path ) ) f = open ( output_path , 'w' ) f . write ( """\
  # Explicit library dependency information.
  #
  # The following property assignments tell CMake about link
  # dependencies of libraries imported from LLVM.
  """ ) self . foreach_cmake_library ( lambda ci : f . write ( """\
  set_property(TARGET %s PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES %s)\n""" % ( ci . get_prefixed_library_name ( ) , " " . join ( sorted ( dep . get_prefixed_library_name ( ) for dep in self . get_required_libraries_for_component ( ci ) ) ) ) ) , enabled_optional_components , skip_disabled = True , skip_not_installed = True # Do not export internal libraries like gtest ) f . close ( )