Parallel build options expanded.
authorIsaac Dooley <idooley2@illinois.edu>
Thu, 7 Aug 2008 19:42:43 +0000 (19:42 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Thu, 7 Aug 2008 19:42:43 +0000 (19:42 +0000)
smart-build.pl

index 9805290bb46ff1a1a7a979ec025266f608e16454..141f29267200a2b67d3e9f6bb24c89c674a0384d 100755 (executable)
@@ -453,12 +453,43 @@ while($line = <>){
 # Currently LIBS cannot be safely built with -j4
 $j = "";
 if($target eq "charm++"){
-       print "\nDo you want to do a parallel build (-j4)?[Y/n]";
-       $p = promptUserYN();
-       if($p eq "yes" || $p eq "default"){
-         $j = "-j4";
+    print << "EOF";
+    
+Do you want to compile in parallel?
+        1) No
+        2) Build with -j2
+        3) Build with -j4 [default]
+        4) Build with -j8
+        5) Build with -j16
+        6) Build with -j32
+
+EOF
+
+    while($line = <>) {
+        chomp $line;
+        if($line eq "1"){
+           $j = "";
+           last;
+        } elsif($line eq "2") {
+           $j = "-j2";
+           last; 
+       } elsif($line eq "3" || $line eq "") {
+           $j = "-j4";
+           last;
+       }  elsif($line eq "4") {
+           $j = "-j8";
+           last;
+       }  elsif($line eq "5") {
+           $j = "-j16";
+           last;
+       }  elsif($line eq "6") {
+            $j = "-j32";
+            last;
+        }  else {
+           print "Invalid option, please try again :P\n";
        }
 }
+}
 
 
 # Compose the build line