Esempio n. 1
0
def BuildCoreLib(registry, out_dir, configured_toolchain, ebb_module,
                 stdext_module):
  return modules.StaticLibraryModule(
      'respire_lib', registry, out_dir, configured_toolchain,
      sources=[
        'activity_log.cc',
        'activity_log.h',
        'build_targets.cc',
        'build_targets.h',
        'environment.cc',
        'environment.h',
        'error.h',
        'file_exists_node.cc',
        'file_exists_node.h',
        'file_info_node.h',
        'file_process_node.cc',
        'file_process_node.h',
        'future.h',
        'locked_node_storage.cc',
        'locked_node_storage.h',
        'parse_deps.cc',
        'parse_deps.h',
        'property_tree/dictionary_node.h',
        'property_tree/node.h',
        'property_tree/string_node.h',
        'registry_node.cc',
        'registry_node.h',
        'registry_parser.cc',
        'registry_parser.h',
        'registry_processor.cc',
        'registry_processor.h',
        'system_command_node.cc',
        'system_command_node.h',
      ],
      module_dependencies=[ebb_module, stdext_module])
Esempio n. 2
0
def MakeWin32RendererModule(module_title, registry, out_dir,
                            configured_toolchain, sources, module_dependencies,
                            third_party_directory):

    configured_toolchain.configuration.include_directories += [
        os.path.join(third_party_directory, 'angle/include'),
    ]

    renderer_module = modules.StaticLibraryModule(
        module_title,
        registry,
        out_dir,
        configured_toolchain,
        sources=sources,
        static_libraries=[
            os.path.join(third_party_directory, 'angle/lib/libEGL.lib'),
            os.path.join(third_party_directory, 'angle/lib/libGLESv2.lib'),
        ],
        system_libraries=[
            'User32',
            'Gdi32',
        ],
        module_dependencies=module_dependencies)

    for dll_file in glob.glob(third_party_directory + '/angle/lib/*.dll'):
        renderer_module.AttachPackageFile(dll_file)

    return renderer_module
Esempio n. 3
0
def Build(registry, out_dir, configured_toolchain, host_configured_toolchain):
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    host_out_dir = os.path.join(out_dir, 'host')
    if not os.path.exists(host_out_dir):
        os.makedirs(host_out_dir)

    flatbuffers_modules = {}

    configured_toolchain = ModifyConfigurationForFlatbuffers(
        configured_toolchain)
    host_configured_toolchain = ModifyConfigurationForFlatbuffers(
        host_configured_toolchain)

    flatc_library_module = MakeFlatCLibraryModule(registry, out_dir,
                                                  host_configured_toolchain)
    flatbuffers_modules['flatc'] = registry.SubRespire(
        MakeFlatCModule,
        out_dir=out_dir,
        configured_toolchain=host_configured_toolchain,
        flatc_library_module=flatc_library_module)

    # Dummy empty module that will be used to setup include paths.  Flatbuffers
    # does not need to compile anything for runtime support, it's all in headers.
    flatbuffers_modules['flatbuffers'] = modules.StaticLibraryModule(
        'flatbuffers_lib',
        registry,
        out_dir,
        configured_toolchain,
        sources=[],
        public_include_paths=['include'])

    return flatbuffers_modules
Esempio n. 4
0
def MakeFlatCLibraryModule(registry, out_dir, configured_toolchain):
    return modules.StaticLibraryModule(
        'flatc_lib',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'include/flatbuffers/code_generators.h',
            'include/flatbuffers/base.h',
            'include/flatbuffers/flatbuffers.h',
            'include/flatbuffers/hash.h',
            'include/flatbuffers/idl.h',
            'include/flatbuffers/util.h',
            'include/flatbuffers/reflection.h',
            'include/flatbuffers/reflection_generated.h',
            'include/flatbuffers/stl_emulation.h',
            'include/flatbuffers/flexbuffers.h',
            'include/flatbuffers/registry.h',
            'include/flatbuffers/minireflect.h',
            'src/code_generators.cpp',
            'src/idl_parser.cpp',
            'src/idl_gen_text.cpp',
            'src/reflection.cpp',
            'src/util.cpp',
        ],
        public_include_paths=['include'])
Esempio n. 5
0
def Build(registry, out_dir, configured_toolchain):
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    glm_module = modules.StaticLibraryModule('glm',
                                             registry,
                                             out_dir,
                                             configured_toolchain,
                                             sources=[],
                                             public_include_paths=[
                                                 'glm',
                                             ])

    return glm_module
Esempio n. 6
0
def MakeRaspiRendererModule(module_title, registry, out_dir,
                            configured_toolchain, sources,
                            module_dependencies):
    return modules.StaticLibraryModule(module_title,
                                       registry,
                                       out_dir,
                                       configured_toolchain,
                                       sources=sources,
                                       system_libraries=[
                                           'brcmEGL',
                                           'brcmGLESv2',
                                           'bcm_host',
                                           'vcos',
                                           'vchiq_arm',
                                       ],
                                       module_dependencies=module_dependencies)
Esempio n. 7
0
def BuildEntifyProtobufDefs(
    registry, out_dir, configured_toolchain, protobuf_modules):
  # We want these files to go in to a 'entify' subdirectory so that the header
  # can be included prefixed with 'entify/'.
  include_dir = out_dir
  out_dir = os.path.join(include_dir, 'entify')
  if not os.path.exists(out_dir):
    os.makedirs(out_dir)

  protoc = protobuf_modules['protoc'].GetOutputFiles()[0]

  RENDERER_DEFINITIONS_PROTO_FILE = 'renderer_definitions.proto'
  abs_proto_path = os.path.abspath(RENDERER_DEFINITIONS_PROTO_FILE)
  abs_proto_dir = os.path.dirname(abs_proto_path)

  results = {
    'cc': os.path.join(out_dir, 'renderer_definitions.pb.cc'),
    'h': os.path.join(out_dir, 'renderer_definitions.pb.h'),
    'include_dir': include_dir,
  }

  registry.SystemCommand(
      inputs=[
        protoc,
        RENDERER_DEFINITIONS_PROTO_FILE
      ],
      outputs=[
        results['cc'],
        results['h'],
      ],
      command=[protoc, '--proto_path=' + abs_proto_dir, '--cpp_out=' + out_dir,
               RENDERER_DEFINITIONS_PROTO_FILE])

  return modules.StaticLibraryModule(
      'renderer_protobuf_definitions', registry, out_dir, configured_toolchain,
      sources=[
        results['cc'],
        results['h'],
      ],
      inherited_hard_dependencies=[results['h']],
      public_include_paths=[
        results['include_dir'],
      ],
      module_dependencies=[protobuf_modules['protobuf']])
Esempio n. 8
0
def MakeLinuxRendererModule(module_title, registry, out_dir,
                            configured_toolchain, sources, module_dependencies,
                            use_egldevice):
    if use_egldevice:
        configured_toolchain.configuration.defines += ['USE_EGLDEVICE']
        sources += [
            'egl_device_interface.cc',
            'egl_device_interface.h',
        ]

    return modules.StaticLibraryModule(module_title,
                                       registry,
                                       out_dir,
                                       configured_toolchain,
                                       sources=sources,
                                       system_libraries=[
                                           'EGL',
                                           'GLESv2',
                                       ],
                                       module_dependencies=module_dependencies)
Esempio n. 9
0
def BuildWithDeps(registry, out_dir, configured_toolchain, entify_module,
                  libb2_module, glm_module, protobuf_module):

    configured_toolchain.configuration.include_directories += [
        os.path.dirname(os.path.realpath(__file__)),
    ]

    entifypp_module = modules.StaticLibraryModule(
        'entifypp',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'entifypp.cc',
            'include/entifypp/draw_call.h',
            'include/entifypp/draw_sequence.h',
            'include/entifypp/draw_set.h',
            'include/entifypp/draw_tree.h',
            'include/entifypp/entifypp.h',
            'include/entifypp/glsl_fragment_shader.h',
            'include/entifypp/glsl_vertex_shader.h',
            'include/entifypp/hash.h',
            'include/entifypp/pipeline.h',
            'include/entifypp/types.h',
            'include/entifypp/uniform_values.h',
            'include/entifypp/vertex_buffer.h',
            'submit_to_protobuf.cc',
            'submit_to_protobuf.h',
        ],
        public_include_paths=[
            'include',
        ],
        module_dependencies=[
            entify_module,
            libb2_module,
            glm_module,
            protobuf_module,
        ])

    return entifypp_module
Esempio n. 10
0
def MakeProtobufLiteModule(registry, out_dir, configured_toolchain):
    return modules.StaticLibraryModule(
        'protobuf_lite',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'src/google/protobuf/any_lite.cc',
            'src/google/protobuf/arena.cc',
            'src/google/protobuf/extension_set.cc',
            'src/google/protobuf/generated_enum_util.cc',
            'src/google/protobuf/generated_message_table_driven_lite.cc',
            'src/google/protobuf/generated_message_util.cc',
            'src/google/protobuf/implicit_weak_message.cc',
            'src/google/protobuf/io/coded_stream.cc',
            'src/google/protobuf/io/io_win32.cc',
            'src/google/protobuf/io/strtod.cc',
            'src/google/protobuf/io/zero_copy_stream.cc',
            'src/google/protobuf/io/zero_copy_stream_impl.cc',
            'src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
            'src/google/protobuf/message_lite.cc',
            'src/google/protobuf/parse_context.cc',
            'src/google/protobuf/repeated_field.cc',
            'src/google/protobuf/stubs/bytestream.cc',
            'src/google/protobuf/stubs/common.cc',
            'src/google/protobuf/stubs/int128.cc',
            'src/google/protobuf/stubs/status.cc',
            'src/google/protobuf/stubs/statusor.cc',
            'src/google/protobuf/stubs/stringpiece.cc',
            'src/google/protobuf/stubs/stringprintf.cc',
            'src/google/protobuf/stubs/structurally_valid.cc',
            'src/google/protobuf/stubs/strutil.cc',
            'src/google/protobuf/stubs/time.cc',
            'src/google/protobuf/wire_format_lite.cc',
        ],
        public_include_paths=['src'])
Esempio n. 11
0
def Build(registry, out_dir, configured_toolchain, platform='host',
          googletest_modules=None):
  if not os.path.exists(out_dir):
    os.makedirs(out_dir)

  if platform == 'host':
    platform = sys.platform

  if platform == 'win32':
    platform_sources = [
      'platform/win32/context.cc',
      'platform/win32/file_system.cc',
      'platform/win32/subprocess.cc',
    ]
  elif platform == 'raspi' or 'linux' in platform or platform == 'jetson':
    platform_sources = [
      'platform/posix/context.cc',
      'platform/posix/subprocess.cc',
      'platform/unix/file_system.cc',
    ]

  platform_lib = modules.StaticLibraryModule(
      'platform_lib', registry, out_dir, configured_toolchain,
      sources=[
        'platform/context.h',
        'platform/file_system.h',
        'platform/subprocess.h',
      ] + platform_sources,
      public_include_paths=['.'])

  stdext_lib = modules.StaticLibraryModule(
      'stdext_lib', registry, out_dir, configured_toolchain,
      sources=[
        'stdext/align.h',
        'stdext/murmurhash/MurmurHash3.cpp',
        'stdext/murmurhash/MurmurHash3.h',
        'stdext/numeric.h',
        'stdext/optional.h',
        'stdext/span.h',
        'stdext/string_view.h',
        'stdext/type_id.h',
        'stdext/types.h',
        'stdext/variant.h',
      ],
      public_include_paths=['.'],
      module_dependencies=[platform_lib])

  if googletest_modules:
    stdext_tests = modules.ExecutableModule(
        'stdext_tests', registry, out_dir, configured_toolchain,
        sources = [
          'stdext/file_system_test.cc',
          'stdext/span_test.cc',
          'stdext/variant_test.cc',
        ],
        module_dependencies=[
          stdext_lib,
          googletest_modules['gtest_main'],
        ])

    run_stdext_tests_timestamp_file = os.path.join(
        out_dir, 'stdext_tests.timestamp')
    registry.PythonFunction(
        inputs=[stdext_tests.GetOutputFiles()[0]],
        outputs=[run_stdext_tests_timestamp_file],
        function=run_with_timestamp.RunAndTimestampOnSuccess,
        timestamp_file=run_stdext_tests_timestamp_file,
        command=[stdext_tests.GetOutputFiles()[0]])

    platform_tests = modules.ExecutableModule(
        'platform_tests', registry, out_dir, configured_toolchain,
        sources = [
          'platform/context_test.cc',
        ],
        module_dependencies=[
          platform_lib,
          googletest_modules['gtest_main'],
        ])

    run_platform_tests_timestamp_file = os.path.join(
        out_dir, 'platform_tests.timestamp')
    registry.PythonFunction(
        inputs=[platform_tests.GetOutputFiles()[0]],
        outputs=[run_platform_tests_timestamp_file],
        function=run_with_timestamp.RunAndTimestampOnSuccess,
        timestamp_file=run_platform_tests_timestamp_file,
        command=[platform_tests.GetOutputFiles()[0]])

  output_modules = {'stdext_lib': stdext_lib}
  if googletest_modules:
    output_modules.update({
      'stdext_tests': stdext_tests,
      'run_stdext_tests': run_stdext_tests_timestamp_file,
      'platform_tests': platform_tests,
      'run_platform_tests': run_platform_tests_timestamp_file,
    })

  return output_modules
Esempio n. 12
0
def MakeProtobufModule(registry, out_dir, configured_toolchain,
                       protobuf_lite_module):
    return modules.StaticLibraryModule(
        'protobuf',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'src/google/protobuf/any.cc',
            'src/google/protobuf/any.pb.cc',
            'src/google/protobuf/api.pb.cc',
            'src/google/protobuf/compiler/importer.cc',
            'src/google/protobuf/compiler/parser.cc',
            'src/google/protobuf/descriptor.cc',
            'src/google/protobuf/descriptor.pb.cc',
            'src/google/protobuf/descriptor_database.cc',
            'src/google/protobuf/duration.pb.cc',
            'src/google/protobuf/dynamic_message.cc',
            'src/google/protobuf/empty.pb.cc',
            'src/google/protobuf/extension_set_heavy.cc',
            'src/google/protobuf/field_mask.pb.cc',
            'src/google/protobuf/generated_message_reflection.cc',
            'src/google/protobuf/generated_message_table_driven.cc',
            'src/google/protobuf/io/gzip_stream.cc',
            'src/google/protobuf/io/printer.cc',
            'src/google/protobuf/io/tokenizer.cc',
            'src/google/protobuf/map_field.cc',
            'src/google/protobuf/message.cc',
            'src/google/protobuf/reflection_ops.cc',
            'src/google/protobuf/service.cc',
            'src/google/protobuf/source_context.pb.cc',
            'src/google/protobuf/struct.pb.cc',
            'src/google/protobuf/stubs/substitute.cc',
            'src/google/protobuf/text_format.cc',
            'src/google/protobuf/timestamp.pb.cc',
            'src/google/protobuf/type.pb.cc',
            'src/google/protobuf/unknown_field_set.cc',
            'src/google/protobuf/util/delimited_message_util.cc',
            'src/google/protobuf/util/field_comparator.cc',
            'src/google/protobuf/util/field_mask_util.cc',
            'src/google/protobuf/util/internal/datapiece.cc',
            'src/google/protobuf/util/internal/default_value_objectwriter.cc',
            'src/google/protobuf/util/internal/error_listener.cc',
            'src/google/protobuf/util/internal/field_mask_utility.cc',
            'src/google/protobuf/util/internal/json_escaping.cc',
            'src/google/protobuf/util/internal/json_objectwriter.cc',
            'src/google/protobuf/util/internal/json_stream_parser.cc',
            'src/google/protobuf/util/internal/object_writer.cc',
            'src/google/protobuf/util/internal/proto_writer.cc',
            'src/google/protobuf/util/internal/protostream_objectsource.cc',
            'src/google/protobuf/util/internal/protostream_objectwriter.cc',
            'src/google/protobuf/util/internal/type_info.cc',
            'src/google/protobuf/util/internal/type_info_test_helper.cc',
            'src/google/protobuf/util/internal/utility.cc',
            'src/google/protobuf/util/json_util.cc',
            'src/google/protobuf/util/message_differencer.cc',
            'src/google/protobuf/util/time_util.cc',
            'src/google/protobuf/util/type_resolver_util.cc',
            'src/google/protobuf/wire_format.cc',
            'src/google/protobuf/wrappers.pb.cc',
        ],
        module_dependencies=[protobuf_lite_module],
        public_include_paths=['src'])
Esempio n. 13
0
def MakeProtoCModule(registry, out_dir, configured_toolchain, protobuf_module):
    protoc_lib_module = modules.StaticLibraryModule(
        'protoc_lib',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'src/google/protobuf/compiler/code_generator.cc',
            'src/google/protobuf/compiler/command_line_interface.cc',
            'src/google/protobuf/compiler/cpp/cpp_enum.cc',
            'src/google/protobuf/compiler/cpp/cpp_enum_field.cc',
            'src/google/protobuf/compiler/cpp/cpp_extension.cc',
            'src/google/protobuf/compiler/cpp/cpp_field.cc',
            'src/google/protobuf/compiler/cpp/cpp_file.cc',
            'src/google/protobuf/compiler/cpp/cpp_generator.cc',
            'src/google/protobuf/compiler/cpp/cpp_helpers.cc',
            'src/google/protobuf/compiler/cpp/cpp_map_field.cc',
            'src/google/protobuf/compiler/cpp/cpp_message.cc',
            'src/google/protobuf/compiler/cpp/cpp_message_field.cc',
            'src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc',
            'src/google/protobuf/compiler/cpp/cpp_primitive_field.cc',
            'src/google/protobuf/compiler/cpp/cpp_service.cc',
            'src/google/protobuf/compiler/cpp/cpp_string_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_doc_comment.cc',
            'src/google/protobuf/compiler/csharp/csharp_enum.cc',
            'src/google/protobuf/compiler/csharp/csharp_enum_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_field_base.cc',
            'src/google/protobuf/compiler/csharp/csharp_generator.cc',
            'src/google/protobuf/compiler/csharp/csharp_helpers.cc',
            'src/google/protobuf/compiler/csharp/csharp_map_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_message.cc',
            'src/google/protobuf/compiler/csharp/csharp_message_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_primitive_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_reflection_class.cc',
            'src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc',
            'src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc',
            'src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc',
            'src/google/protobuf/compiler/java/java_context.cc',
            'src/google/protobuf/compiler/java/java_doc_comment.cc',
            'src/google/protobuf/compiler/java/java_enum.cc',
            'src/google/protobuf/compiler/java/java_enum_field.cc',
            'src/google/protobuf/compiler/java/java_enum_field_lite.cc',
            'src/google/protobuf/compiler/java/java_enum_lite.cc',
            'src/google/protobuf/compiler/java/java_extension.cc',
            'src/google/protobuf/compiler/java/java_extension_lite.cc',
            'src/google/protobuf/compiler/java/java_field.cc',
            'src/google/protobuf/compiler/java/java_file.cc',
            'src/google/protobuf/compiler/java/java_generator.cc',
            'src/google/protobuf/compiler/java/java_generator_factory.cc',
            'src/google/protobuf/compiler/java/java_helpers.cc',
            'src/google/protobuf/compiler/java/java_map_field.cc',
            'src/google/protobuf/compiler/java/java_map_field_lite.cc',
            'src/google/protobuf/compiler/java/java_message.cc',
            'src/google/protobuf/compiler/java/java_message_builder.cc',
            'src/google/protobuf/compiler/java/java_message_builder_lite.cc',
            'src/google/protobuf/compiler/java/java_message_field.cc',
            'src/google/protobuf/compiler/java/java_message_field_lite.cc',
            'src/google/protobuf/compiler/java/java_message_lite.cc',
            'src/google/protobuf/compiler/java/java_name_resolver.cc',
            'src/google/protobuf/compiler/java/java_primitive_field.cc',
            'src/google/protobuf/compiler/java/java_primitive_field_lite.cc',
            'src/google/protobuf/compiler/java/java_service.cc',
            'src/google/protobuf/compiler/java/java_shared_code_generator.cc',
            'src/google/protobuf/compiler/java/java_string_field.cc',
            'src/google/protobuf/compiler/java/java_string_field_lite.cc',
            'src/google/protobuf/compiler/js/js_generator.cc',
            'src/google/protobuf/compiler/js/well_known_types_embed.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_enum.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_extension.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_field.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_file.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_generator.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_helpers.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_map_field.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_message.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_message_field.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_oneof.cc',
            'src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc',
            'src/google/protobuf/compiler/php/php_generator.cc',
            'src/google/protobuf/compiler/plugin.cc',
            'src/google/protobuf/compiler/plugin.pb.cc',
            'src/google/protobuf/compiler/python/python_generator.cc',
            'src/google/protobuf/compiler/ruby/ruby_generator.cc',
            'src/google/protobuf/compiler/subprocess.cc',
            'src/google/protobuf/compiler/zip_writer.cc',
        ],
        module_dependencies=[protobuf_module],
        public_include_paths=['src'])

    return modules.ExecutableModule('protoc',
                                    registry,
                                    out_dir,
                                    configured_toolchain,
                                    sources=[
                                        'src/google/protobuf/compiler/main.cc',
                                    ],
                                    module_dependencies=[protoc_lib_module])
Esempio n. 14
0
def Build(registry,
          out_dir,
          configured_toolchain,
          stdext_modules,
          googletest_modules=None):
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    assert (googletest_modules)

    ebb_lib = modules.StaticLibraryModule(
        'ebb_lib',
        registry,
        out_dir,
        configured_toolchain,
        sources=[
            'consumer.cc',
            'ebb.h',
            'environment.cc',
            'fiber_condition_variable.cc',
            'fiber_condition_variable.h',
            'lib/file_reader.cc',
            'lib/file_reader.h',
            'lib/json_string_view.cc',
            'lib/json_string_view.h',
            'lib/json_tokenizer.cc',
            'lib/json_tokenizer.h',
            'linked_list.h',
            'queue.cc',
            'thread_pool.cc',
            'thread_pool.h',
        ],
        public_include_paths=['.'],
        module_dependencies=[stdext_modules['stdext_lib']])

    ebb_tests = modules.ExecutableModule('ebb_tests',
                                         registry,
                                         out_dir,
                                         configured_toolchain,
                                         sources=[
                                             'consumer_test.cc',
                                             'environment_test.cc',
                                             'queue_test.cc',
                                             'push_pull_consumer_test.cc',
                                             'lib/json_tokenizer_test.cc',
                                             'lib/file_reader_test.cc',
                                         ],
                                         module_dependencies=[
                                             ebb_lib,
                                             googletest_modules['gtest_main'],
                                         ])

    run_ebb_tests_timestamp_file = os.path.join(out_dir, 'ebb_tests.timestamp')
    registry.PythonFunction(
        inputs=[ebb_tests.GetOutputFiles()[0]],
        outputs=[run_ebb_tests_timestamp_file],
        function=run_with_timestamp.RunAndTimestampOnSuccess,
        timestamp_file=run_ebb_tests_timestamp_file,
        command=[ebb_tests.GetOutputFiles()[0]])

    return {
        'ebb_lib': ebb_lib,
        'ebb_tests': ebb_tests,
        'run_ebb_tests': run_ebb_tests_timestamp_file,
    }
Esempio n. 15
0
def Build(registry, out_dir, configured_toolchain):
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    gtest_configured_toolchain = configured_toolchain

    gtest_configured_toolchain.configuration.defines += [
        'GTEST_LANG_CXX11=1',
        'GTEST_API_=',
    ]

    gtest_configured_toolchain.configuration.include_directories = [
        os.path.join(os.path.dirname(__file__), 'googletest'),
    ]

    gtest_lib = modules.StaticLibraryModule(
        'gtest',
        registry,
        out_dir,
        gtest_configured_toolchain,
        sources=[
            'googletest/include/gtest/gtest-death-test.h',
            'googletest/include/gtest/gtest-message.h',
            'googletest/include/gtest/gtest-param-test.h',
            'googletest/include/gtest/gtest-printers.h',
            'googletest/include/gtest/gtest-spi.h',
            'googletest/include/gtest/gtest-test-part.h',
            'googletest/include/gtest/gtest-typed-test.h',
            'googletest/include/gtest/gtest.h',
            'googletest/include/gtest/gtest_pred_impl.h',
            'googletest/include/gtest/internal/gtest-death-test-internal.h',
            'googletest/include/gtest/internal/gtest-filepath.h',
            'googletest/include/gtest/internal/gtest-internal.h',
            'googletest/include/gtest/internal/gtest-linked_ptr.h',
            'googletest/include/gtest/internal/gtest-param-util-generated.h',
            'googletest/include/gtest/internal/gtest-param-util.h',
            'googletest/include/gtest/internal/gtest-port.h',
            'googletest/include/gtest/internal/gtest-string.h',
            'googletest/include/gtest/internal/gtest-tuple.h',
            'googletest/include/gtest/internal/gtest-type-util.h',
            'googletest/src/gtest-death-test.cc',
            'googletest/src/gtest-filepath.cc',
            'googletest/src/gtest-internal-inl.h',
            'googletest/src/gtest-port.cc',
            'googletest/src/gtest-printers.cc',
            'googletest/src/gtest-test-part.cc',
            'googletest/src/gtest-typed-test.cc',
            'googletest/src/gtest.cc',
        ],
        public_include_paths=[
            'googletest/include',
        ])

    gtest_main = modules.StaticLibraryModule(
        'gtest_main',
        registry,
        out_dir,
        gtest_configured_toolchain,
        sources=[
            'googletest/src/gtest_main.cc',
        ],
        module_dependencies=[
            gtest_lib,
        ])

    return {'gtest_main': gtest_main}
Esempio n. 16
0
def BuildEntifyFlatbuffersDefs(
    registry, out_dir, configured_toolchain, flatbuffers_modules):
  # We want these files to go in to a 'entify' subdirectory so that the header
  # can be included prefixed with 'entify/'.
  include_dir = out_dir
  out_dir = os.path.join(include_dir, 'entify')
  if not os.path.exists(out_dir):
    os.makedirs(out_dir)

  flatc = flatbuffers_modules['flatc'].GetOutputFiles()[0]

  RENDERER_DEFINITIONS_SCHEMA_FILE = 'renderer_definitions.fbs'
  abs_schema_path = os.path.abspath(RENDERER_DEFINITIONS_SCHEMA_FILE)
  abs_schema_dir = os.path.dirname(abs_schema_path)

  generated_header_file = os.path.join(
      out_dir, 'renderer_definitions_generated.h')

  registry.SystemCommand(
      inputs=[
        flatc,
        RENDERER_DEFINITIONS_SCHEMA_FILE
      ],
      outputs=[
        generated_header_file,
      ],
      command=[flatc, '-o', out_dir, '-c', abs_schema_path])

  julia_out_dir = os.path.join(out_dir, 'julia')
  if not os.path.exists(julia_out_dir):
    os.makedirs(julia_out_dir)

  julia_generated_file = (
      os.path.join(julia_out_dir, 'renderer_definitions_generated.jl'))
  julia_extra_files_dir = os.path.join(julia_out_dir, 'entify')

  registry.SystemCommand(
      inputs=[
        flatc,
        RENDERER_DEFINITIONS_SCHEMA_FILE
      ],
      outputs=[
        julia_generated_file,
      ],
      soft_outputs=[
        julia_extra_files_dir,
      ],
      command=[flatc, '-o', julia_out_dir, '--julia', abs_schema_path])

  flatbuffers_defs_module = modules.StaticLibraryModule(
      'renderer_flatbuffers_definitions', registry, out_dir,
      configured_toolchain,
      sources=[
        generated_header_file,
      ],
      inherited_hard_dependencies=[generated_header_file],
      public_include_paths=[
        include_dir,
      ],
      module_dependencies=[flatbuffers_modules['flatbuffers']])

  flatbuffers_defs_module.AttachPackageFile(julia_generated_file)
  flatbuffers_defs_module.AttachPackageGeneratedDirectory(julia_extra_files_dir)
  flatbuffers_defs_module.AttachPackageFile(
      '../third_party/flatbuffers/julia/src/')

  return flatbuffers_defs_module