remove cpu detection, who cares when the runner's about to be totally slimmed down
This commit is contained in:
parent
894b979674
commit
ce7b0f1368
@ -2,12 +2,6 @@ require 'rbconfig'
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'rubygems/version'
|
require 'rubygems/version'
|
||||||
|
|
||||||
begin
|
|
||||||
require 'facter'
|
|
||||||
rescue LoadError
|
|
||||||
warn 'Including Facter allows for detection of # of cpus, resulting in faster compilations.'
|
|
||||||
end
|
|
||||||
|
|
||||||
module Qt
|
module Qt
|
||||||
class NotInstalledError < StandardError; end
|
class NotInstalledError < StandardError; end
|
||||||
class Qmake
|
class Qmake
|
||||||
@ -49,7 +43,7 @@ module Qt
|
|||||||
end
|
end
|
||||||
|
|
||||||
def make_options
|
def make_options
|
||||||
"-j#{number_of_cpus}"
|
""
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -103,14 +97,6 @@ module Qt
|
|||||||
end.compact.join(" ")
|
end.compact.join(" ")
|
||||||
end
|
end
|
||||||
|
|
||||||
def number_of_cpus
|
|
||||||
if defined?(Facter)
|
|
||||||
Facter.sp_number_processors rescue Facter.processorcount
|
|
||||||
else
|
|
||||||
1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_exe_path(command)
|
def get_exe_path(command)
|
||||||
path = %x{which #{command}}.strip
|
path = %x{which #{command}}.strip
|
||||||
path = nil if path == ''
|
path = nil if path == ''
|
||||||
|
@ -140,14 +140,9 @@ describe Qt::Qmake do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe '.make_options' do
|
describe '.make_options' do
|
||||||
let(:cpu_count) { 3 }
|
|
||||||
subject { Qt::Qmake.make_options }
|
subject { Qt::Qmake.make_options }
|
||||||
|
|
||||||
before do
|
it { should == "" }
|
||||||
Qt::Qmake.stubs(:number_of_cpus).returns(cpu_count)
|
|
||||||
end
|
|
||||||
|
|
||||||
it { should == "-j#{cpu_count}" }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user