diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-04-01 18:15:11 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-04-01 18:15:11 +0200 |
commit | 3635bb7d75ae54c59085b802be23a9a891d1272d (patch) | |
tree | d296be844df8a281117751b341c83224597709e2 | |
parent | f74a0d4d3500c7e61a2cfa17f2c054f1033bcb84 (diff) |
Pulse: First attempt to use JOM + IB on Windows.
We should be able to use JOM+IB for building Qt.
-rwxr-xr-x | pulse-build-script | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/pulse-build-script b/pulse-build-script index 058e8c9..01281a5 100755 --- a/pulse-build-script +++ b/pulse-build-script @@ -61,6 +61,18 @@ sub prop } } +sub find_exe { + my ($exe) = @_; + return if (!defined($exe)); + my @paths = split(/;/, $ENV{"PATH"}); + foreach my $path (@paths) { + $path =~ s/\\$//g; + $path =~ s/\\/\//g; + my $file = $path . '/' . $exe; + return $file if ((-e $file) && (-f $file)); + } +} + # Global parameters our $build_test = 0; our $run_autotests = 0; @@ -184,9 +196,21 @@ $configure_args .= ' '.prop("configure.extra_args", ""); system_v("$configure $configure_args") and die("configure failed"); -# only support nmake for Windows for now +# only support nmake for Windows as fallback my $make = "nmake"; + +# we support make for Linux and Mac $make = "make " . prop("make.args", "-j4") if ($Config{'osname'} !~ /mswin/i); + +# we support JOM / IncrediBuild for Windows +if ($Config{'osname'} =~ /mswin/i) { + if (find_exe('xgconsole.exe') && find_exe('jom.exe')) { + $make = "xgconsole /NOLOGO /COMMAND=\"jom.exe /NOLOGO " . prop("make.args", "-j60") . " /F Makefile\" /PROFILE=\"C:/Jom/bin/profile.xml\" /MAXCPUS=60" + } elsif (find_exe('jom.exe')) { + $make = "jom " . prop("make.args", "-j20"); + } +} + system_v("$make") and die("$make failed"); # Pulse : attempt to run autotests |