Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Suggested change to String option command generation.


Brad,
Where should I send the thank-you card and fruit basket?

This is not directed at Leo, because it does not apply to his patch, but changes should also include JUnit tests too. We also want to publish interfaces, so methods in an interface class should have a javadoc comments, if possible.

That said, I appreciate the help I have received so far.

Sean Evoy
Rational Software - IBM Software Group
Ottawa, Ontario, Canada



"Brad Jarvinen" <Brad.Jarvinen@xxxxxxxxxxxxxx>
Sent by: cdt-dev-admin@xxxxxxxxxxx

03/03/2004 12:41 PM

Please respond to
cdt-dev

To
<cdt-dev@xxxxxxxxxxx>
cc
Subject
RE: [cdt-dev] Suggested change to String option command generation.





When including patches for things like this, I'd really like to see that people also patch the documentation.  For this proposal, I could definitely see the description in the ManagedBuildInfo.exsd needing to be updated to reflect the behavioral change.  Fixes without documentation do not benefit anyone but those submitting the fix.

Thanks,
Brad


-----Original Message-----
From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx]On
Behalf Of Treggiari, Leo
Sent: Wednesday, March 03, 2004 8:33 AM
To: cdt-dev@xxxxxxxxxxx
Cc: Treggiari, Leo
Subject: [cdt-dev] Suggested change to String option command generation.


I'd like to suggest a change to how String options generate their tool command line contribution. Currently, the build model ignores what it finds in the command attribute.  This is fine for the current use of String options - that is, to collect "additional options" where the user enters a full command or commands.  See the Cygwin Executable "Other optimization flags" and "Other debugging flags" as examples.

I also want to use String options for other individual "options that cannot be easily specified using lists or enumerations", as the managed build design spec says.  For example, Intel C++ has a "Loop Unroll Count" optimization.  The command line syntax is -unrolln.  I want to be able to define a "Loop Unroll Count" property and have the user enter the value of n.  To do that, I would like to define a String option where the command is "-unroll", and the value is whatever is entered by the user into the text field.

The proposal is that the build model does NOT ignore what it finds in the command attribute.  Instead, if the defaultValue attribute is present, and contains a string of length > 0, then the command string (if any) is prepended to the defaultValue string to form the command line string.  

The change is mostly upward compatible as the current uses of String options in the CDT "reference" tool chains do not need to be changed because the command attribute is not specified.  Therefore whether the command is ignored, or not, makes no difference.

The change to the code is small and I have included proposed patches below.

Regards,
Leo Treggiari
Intel Corp.


Index: Tool.java
===================================================================
retrieving revision 1.7
diff -u -r1.7 Tool.java
--- Tool.java                 2 Mar 2004 16:35:03 -0000                 1.7
+++ Tool.java                 3 Mar 2004 16:00:52 -0000
@@ -216,8 +216,11 @@
                                                                                     break;
                                                                   
                                                                    case IOption.STRING :
+                                                                                     String strCmd = option.getCommand();
                                                                                     String val = option.getStringValue();
                                                                                     if (val.length() > 0) {
+                                                                                                      if (strCmd != null)
+                                                                                                                       buf.append(strCmd);
                                                                                                      buf.append(val + WHITE_SPACE);
                                                                                     }
                                                                                     break;


Index: ToolReference.java
===================================================================
retrieving revision 1.6
diff -u -r1.6 ToolReference.java
--- ToolReference.java                 2 Mar 2004 15:26:50 -0000                 1.6
+++ ToolReference.java                 3 Mar 2004 16:01:24 -0000
@@ -182,8 +182,11 @@
                                                                                     break;
                                                                   
                                                                    case IOption.STRING :
+                                                                                     String strCmd = option.getCommand();
                                                                                     String val = option.getStringValue();
                                                                                     if (val.length() > 0) {
+                                                                                                      if (strCmd != null)
+                                                                                                                       buf.append(strCmd);
                                                                                                      buf.append(val + WHITE_SPACE);
                                                                                     }
                                                                                     break;

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top