Module: Cxxproject::HasLibraries

Included in:
BinaryLibrary, Linkable, Makefile, StaticLibrary
Defined in:
lib/cxxproject/buildingblocks/has_libraries_mixin.rb

Constant Summary collapse

LIB =
:lib
USERLIB =
:userlib
LIB_WITH_PATH =
:lib_with_path
SEARCH_PATH =
:search_path
DEPENDENCY =
:dependency

Instance Method Summary collapse

Instance Method Details

#add_lib_element(type, value, front = false) ⇒ Object

value: can be string or building block



14
15
16
17
18
19
20
21
# File 'lib/cxxproject/buildingblocks/has_libraries_mixin.rb', line 14

def add_lib_element(type, value, front = false)
  elem = [type, value.instance_of?(String) ? value : value.name]
  if front
    lib_elements.unshift(elem)
  else
    lib_elements << elem
  end
end

#add_lib_elements(array_of_tuples, front = false) ⇒ Object

  1. element: type
  2. element: name, must not be a building block


25
26
27
28
29
30
31
# File 'lib/cxxproject/buildingblocks/has_libraries_mixin.rb', line 25

def add_lib_elements(array_of_tuples, front = false)
  if front
    @lib_elements = array_of_tuples+lib_elements
  else
    lib_elements.concat(array_of_tuples)
  end
end

#lib_elementsObject



9
10
11
# File 'lib/cxxproject/buildingblocks/has_libraries_mixin.rb', line 9

def lib_elements
  @lib_elements ||= []
end