Patch #2750 2009-04-29 15:38

raybert

allow build options to be edited on all platforms
Download
2750-allow_build_op.patch (2.2 KB)
Category
Application::Refinement
Status
Open
Close date
 
Assigned to
 
diff -r 4cdba80fe1de .hgtags
--- a/.hgtags    Wed Apr 29 11:04:20 2009 -0400
+++ b/.hgtags    Wed Apr 29 11:34:38 2009 -0400
@@ -4,3 +4,4 @@
 b79c5d3ddb2dc39048b5eda39f3ae63e5eddcbfc baseline
 f10e24fc4d48f4a11261a6e7f159e8e0089942f7 workspace-patch-2
 8fd7b40a4d54c9c8f080ada561bba8a149a90762 workspace-patch-3
+1b99b277e01d5546741da9ef69f145015e5624ec build-options-patch-1
diff -r 4cdba80fe1de src/plugins/compilergcc/compileroptionsdlg.cpp
--- a/src/plugins/compilergcc/compileroptionsdlg.cpp    Wed Apr 29 11:04:20 2009 -0400
+++ b/src/plugins/compilergcc/compileroptionsdlg.cpp    Wed Apr 29 11:34:38 2009 -0400
@@ -292,7 +292,7 @@
                     "If you click \"Cancel\", the project/target will remain configured for that compiler and consequently can not be configured and will not be built."),
                     CompilerId.c_str());
         Compiler* compiler = 0;
-        if ((m_pTarget && m_pTarget->SupportsCurrentPlatform()) || (!m_pTarget && m_pProject))
+        if ((m_pTarget /*&& m_pTarget->SupportsCurrentPlatform()*/) || (!m_pTarget && m_pProject))
         {
             compiler = CompilerFactory::SelectCompilerUI(msg);
         }
@@ -1096,14 +1096,14 @@
         XRCCTRL(*this, "cmbCompiler", wxChoice)->SetSelection(compilerIdx);
         // we don't update the compiler index yet, we leave that to CompilerChanged();
         m_pTarget = data->GetTarget();
-        if (m_pTarget && !m_pTarget->SupportsCurrentPlatform())
-        {
-            if (nb)
-            {
-                nb->Disable();
-            }
-        }
-        else
+//        if (m_pTarget && !m_pTarget->SupportsCurrentPlatform())
+//        {
+//            if (nb)
+//            {
+//                nb->Disable();
+//            }
+//        }
+//        else
         {
             if (nb)
             {
@@ -1126,7 +1126,7 @@
                     "If you click \"Cancel\", the project/target will remain configured for that compiler and consequently can not be configured and will not be built."),
                     CompilerId.c_str());
         Compiler* compiler = 0;
-        if (m_pTarget && m_pTarget->SupportsCurrentPlatform())
+        if (m_pTarget)// && m_pTarget->SupportsCurrentPlatform())
         {
             compiler = CompilerFactory::SelectCompilerUI(msg);
         }
raybert 2009-04-29 15:44

This patch disables the logic that prevents build options editing for targets that are not supported on the current platform.

In my experience I've found this 'feature' to be very annoying. I manage a cross-platform project and I sometimes need to update the build options on all platforms. Forcing me to actually visit each platform to do this is a PITB. The work-around I've used is also a PITB (temporarily modify the supported platforms for each target that needs editing and changing them back).

The one potential issue I can see with this change is that someone could accidentally put a Windows path in a Linux-only target or vice versa. To this I would save caveat emptor. :)