|
|
@@ -117,7 +117,7 @@ task :make do
|
|
|
end
|
|
|
}
|
|
|
build_tree = ENV["#{platform}_build_tree"] || ENV['build_tree'] || "../#{platform}-Build"
|
|
|
- use_ccache = ''
|
|
|
+ ccache_envvar = ''
|
|
|
if !Dir.glob("#{build_tree}/*.xcodeproj").empty?
|
|
|
# xcodebuild
|
|
|
if !numjobs.empty?
|
|
|
@@ -131,7 +131,8 @@ task :make do
|
|
|
filter = unfilter ? '' : '/nologo /verbosity:minimal'
|
|
|
else
|
|
|
# make
|
|
|
- use_ccache = 'CCACHE_SLOPPINESS=pch_defines,time_macros CCACHE_COMPRESS=1' if ENV['USE_CCACHE']
|
|
|
+ ccache_envvar = 'CCACHE_SLOPPINESS=pch_defines,time_macros' unless ENV['CCACHE_SLOPPINESS'] # Only attempt to do the right thing when user hasn't done it
|
|
|
+ ccache_envvar = "#{ccache_envvar} CCACHE_COMPRESS=1" unless ENV['CACHE_COMPRESS']
|
|
|
if numjobs.empty?
|
|
|
case RUBY_PLATFORM
|
|
|
when /linux/
|
|
|
@@ -140,15 +141,16 @@ task :make do
|
|
|
numjobs = `sysctl -n hw.logicalcpu`.chomp
|
|
|
when /win32|mingw|mswin/
|
|
|
require 'win32ole'
|
|
|
- WIN32OLE.connect("winmgmts://").ExecQuery("select NumberOfLogicalProcessors from Win32_ComputerSystem").each { |out| numjobs = out.NumberOfLogicalProcessors }
|
|
|
+ WIN32OLE.connect('winmgmts://').ExecQuery('select NumberOfLogicalProcessors from Win32_ComputerSystem').each { |out| numjobs = out.NumberOfLogicalProcessors }
|
|
|
+ ccache_envvar = '' # Extra env var is harmless even when ccache is not in use, well, except on Windows host system
|
|
|
else
|
|
|
- numjobs = '1'
|
|
|
+ numjobs = 1
|
|
|
end
|
|
|
end
|
|
|
build_options = "-j#{numjobs}#{build_options}"
|
|
|
filter = ''
|
|
|
end
|
|
|
- system "cd \"#{build_tree}\" && #{use_ccache} cmake --build . #{cmake_build_options} -- #{build_options} #{filter}" or abort
|
|
|
+ system "cd \"#{build_tree}\" && #{ccache_envvar} cmake --build . #{cmake_build_options} -- #{build_options} #{filter}" or abort
|
|
|
end
|
|
|
|
|
|
# Usage: rake android [parameter='--es pickedLibrary Urho3DPlayer'] [intent=.SampleLauncher] [package=com.github.urho3d] [success_indicator='Initialized engine'] [payload='sleep 30'] [api=19] [abi=armeabi-v7a] [avd=test_#{api}_#{abi}] [retries=10] [retry_interval=10]
|