Class: Gaudi::Program

Inherits:
Component show all
Defined in:
lib/gaudi/helpers/components.rb

Overview

A Gaudi::Program is a collection of components built for a specific platform.

Instance Attribute Summary collapse

Attributes inherited from Component

#config_files, #configuration, #directories, #identifier, #name, #parent, #platform, #test_directories

Instance Method Summary collapse

Methods inherited from Component

#all, #external_includes, #headers, #include_paths, #interface, #interface_paths, #sources, #test_files

Methods included from StandardPaths

#command_file, #determine_directories, #determine_headers, #determine_interface_paths, #determine_sources, #determine_test_directories, #executable, #is_generated?, #is_unit_test?, #library, #object_file, #unit_test

Methods included from PlatformOperations

#is_assembly?, #is_exe?, #is_header?, #is_library?, #is_source?

Constructor Details

#initialize(config_file, deployment_name, system_config, platform) ⇒ Program

Returns a new instance of Program


105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/gaudi/helpers/components.rb', line 105

def initialize config_file,deployment_name,system_config,platform
  @parent=self
  @configuration=Configuration::BuildConfiguration.load([config_file])
  @name=@identifier= configuration.prefix
  @system_config= system_config
  @platform= platform
  begin
    @directories= determine_directories(@name,system_config.source_directories,system_config,platform)
  rescue GaudiError
    @directories= FileList.new
  end
  @test_directories= determine_test_directories(@directories)
  @config_files= Rake::FileList[config_file]
  @deployment_name=deployment_name
end

Instance Attribute Details

#deployment_nameObject (readonly)

Returns the value of attribute deployment_name


104
105
106
# File 'lib/gaudi/helpers/components.rb', line 104

def deployment_name
  @deployment_name
end

Instance Method Details

#dependenciesObject

All components upon which this Program depends on


129
130
131
# File 'lib/gaudi/helpers/components.rb', line 129

def dependencies
  deps=configuration.dependencies.map{|dep| program_dependency(dep)}
end

#external_librariesObject

External (additional) libraries the Program depends on.


121
122
123
# File 'lib/gaudi/helpers/components.rb', line 121

def external_libraries
  @system_config.external_libraries(@platform)+@configuration.external_libraries(@system_config,platform)
end

#resourcesObject

List of resources to copy with the program artifacts


125
126
127
# File 'lib/gaudi/helpers/components.rb', line 125

def resources
  @configuration.resources
end

#shared_dependenciesObject

All shared library components this Program depends on


133
134
135
# File 'lib/gaudi/helpers/components.rb', line 133

def shared_dependencies
  deps=configuration.shared_dependencies.map{|dep| program_dependency(dep)}
end