rake/swigextensiontask.rb
# Raise an exception unless we have SWIG version 1.3 or later.
Raise an exception unless we have SWIG version 1.3 or later.
Raise an exception unless we have SWIG version 1 . 3 or later .
def verify_swig_version
      @@swig_version ||= IO.popen "#{env[:swig]} -version 2>&1" do |swig|
        banner = swig.readlines.reject { |l| l.strip.empty? }
        banner = banner[0].match(/swig version ([^ ]+)/i)
        banner and banner[1]
      end
      unless @@swig_version and @@swig_version >= '1.3'
        raise "Need SWIG version 1.3 or later (have #{@@swig_version || 'none'})"
      end
    end
def verify_swig_version @@swig_version ||= IO . popen "#{env[:swig]} -version 2>&1" do | swig | banner = swig . readlines . reject { | l | l . strip . empty? } banner = banner [ 0 ] . match ( / swig version ([^ ]+) /i ) banner and banner [ 1 ] end unless @@swig_version and @@swig_version >= '1.3' raise "Need SWIG version 1.3 or later (have #{@@swig_version || 'none'})" end end
Raise an exception unless we have SWIG version 1.3 or later.
Raise an exception unless we have SWIG version 1 . 3 or later .