Module: RakeCompile::DSL

Defined in:
lib/rake-compile/dsl_definition.rb

Instance Method Summary collapse

Instance Method Details

#base_cc_flags(flags) ⇒ Object



13
14
15
# File 'lib/rake-compile/dsl_definition.rb', line 13

def base_cc_flags(flags)
  RakeCompile::Application.app.base_cc_flags = flags
end

#base_cpp_flags(flags) ⇒ Object



21
22
23
# File 'lib/rake-compile/dsl_definition.rb', line 21

def base_cpp_flags(flags)
  RakeCompile::Application.app.base_cpp_flags = flags
end

#base_ld_flags(flags) ⇒ Object



29
30
31
# File 'lib/rake-compile/dsl_definition.rb', line 29

def base_ld_flags(flags)
  RakeCompile::Application.app.base_ld_flags = flags
end

#build_directory(dir) ⇒ Object



8
9
10
11
# File 'lib/rake-compile/dsl_definition.rb', line 8

def build_directory(dir)
  directory dir
  RakeCompile::Application.app.build_directory = dir
end

#cc_flags(flags) ⇒ Object



17
18
19
# File 'lib/rake-compile/dsl_definition.rb', line 17

def cc_flags(flags)
  RakeCompile::Application.app.cc_flags = flags
end

#cpp_flags(flags) ⇒ Object



25
26
27
# File 'lib/rake-compile/dsl_definition.rb', line 25

def cpp_flags(flags)
  RakeCompile::Application.app.cpp_flags = flags
end

#executable(name) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/rake-compile/dsl_definition.rb', line 53

def executable(name)
  Target.define_executable_task(name) do |t|
    yield t
  end

  clear_build_state
end

#ld_flags(flags) ⇒ Object



33
34
35
# File 'lib/rake-compile/dsl_definition.rb', line 33

def ld_flags(flags)
  RakeCompile::Application.app.ld_flags = flags
end


37
38
39
# File 'lib/rake-compile/dsl_definition.rb', line 37

def link_library(library)
  RakeCompile::Application.app.libraries << library
end

#pch(name) ⇒ Object



41
42
43
# File 'lib/rake-compile/dsl_definition.rb', line 41

def pch(name)
  RakeCompile::Application.app.pch = name
end

#static_library(name) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/rake-compile/dsl_definition.rb', line 45

def static_library(name)
  Target.define_static_library_task(name) do |t|
    yield t
  end

  clear_build_state
end