Sha256: a714adc4147a7013152faa7a939387960c386424c30bdc0ff2b92febc8fcdcf4

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

require 'neutron'

module Neutron::CC
  def self.link(*files, target, **opts)
    o = {
      prog: 'cc',
      debug: false,
      args: ''
    }.merge(opts)
    Neutron.execute("#{o[:prog]} -o #{target} #{files.join(' ')} #{'-g' if o[:debug]} #{o[:args]}", must_success: true)
  end

  def self.cc(*files, **opts)
    o = {
      prog: 'cc',
      debug: false,
      args: ''
    }.merge(opts)
    files.each do |file|
      Neutron.execute("#{o[:prog]} -c #{file} #{'-g' if o[:debug]} #{o[:args]}", must_success: true)
    end
  end

  def self.cpp(*files, **opts)
    o = {
      prog: 'c++',
      debug: false,
      args: ''
    }.merge(opts)
    files.each do |file|
      Neutron.execute("#{o[:prog]} -c #{file} #{'-g' if o[:debug]} #{o[:args]}", must_success: true)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neutron-0.1.0 lib/neutron/cc.rb