Class: CCompiler
Instance Attribute Summary collapse
-
#output_type ⇒ Object
Returns the value of attribute output_type.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Compiler
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CCompiler
constructor
A new instance of CCompiler.
-
#is_mingw? ⇒ Boolean
Returns true if the compiler is MinGW.
Methods inherited from Compiler
#cflags, #check_header, #clone, #command, #compile, #default_flags, #flags, #flags=, #has_option, #link, #makefile, #object_files, #quiet=, #rule, #shared_library=, #sources=, #test_compile, #test_link
Constructor Details
#initialize(options = {}) ⇒ CCompiler
Returns a new instance of CCompiler.
325 326 327 328 329 330 331 332 |
# File 'lib/makeconf/compiler.rb', line 325 def initialize( = {}) @search_list = .has_key?(:search) ? [:search] : [ 'cc', 'gcc', 'clang', 'cl.exe'] @search_list = [ @search_list ] unless @search_list.kind_of?(Array) @output_type = nil super('C', '.c') printf "checking for a C compiler.. " @path = search(@search_list) end |
Instance Attribute Details
#output_type ⇒ Object
Returns the value of attribute output_type.
322 323 324 |
# File 'lib/makeconf/compiler.rb', line 322 def output_type @output_type end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
323 324 325 |
# File 'lib/makeconf/compiler.rb', line 323 def path @path end |
Instance Method Details
#is_mingw? ⇒ Boolean
Returns true if the compiler is MinGW
335 336 337 |
# File 'lib/makeconf/compiler.rb', line 335 def is_mingw? @path =~ /mingw/ # Kludge end |