Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign
XML based compilers
Alpha:
I am working on a patch to deal with C-only and C++-only flags; when I complete it, actually seeing its results will probably better explain it than I can by writing a description.
--- Quote from: MortenMacFly on August 06, 2012, 07:09:36 am ---
--- Quote from: Alpha on August 04, 2012, 09:54:56 pm ---By the way, am I correct in assuming the revert of this means that a visible note is preferred over a tool tip?
--- End quote ---
For such important things, yes. Most people don'T wait long enough that the tooltip shows. Also, there are platforms where there is no tooltip. So tooltip should really be a "tip", not to worry about if you don't know it.
--- End quote ---
In that case, the tip is redundant (this also removes the double separator from the context menu when right-clicking on the name of a project).
--- Code: ---Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8193)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -563,7 +563,9 @@
else if (data && data->GetKind() == FileTreeData::ftdkProject)
{
// popup menu on a project
- menu->AppendSeparator();
+ wxMenuItem* itm = menu->FindItemByPosition(menu->GetMenuItemCount() - 1);
+ if (itm && !itm->IsSeparator())
+ menu->AppendSeparator();
menu->Append(idMenuCompileFromProjectManager, _("Build"));
menu->Append(idMenuRebuildFromProjectManager, _("Rebuild"));
menu->Append(idMenuCleanFromProjectManager, _("Clean"));
Index: src/plugins/compilergcc/resources/compiler_options.xrc
===================================================================
--- src/plugins/compilergcc/resources/compiler_options.xrc (revision 8193)
+++ src/plugins/compilergcc/resources/compiler_options.xrc (working copy)
@@ -150,7 +159,6 @@
</object>
<object class="sizeritem">
<object class="wxCheckListBox" name="lstCompilerOptions">
- <tooltip>Right-click to setup or edit compiler flags</tooltip>
<style>wxLB_HSCROLL</style>
</object>
<flag>wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
Index: src/plugins/compilergcc/resources/compilers/compiler_clang.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/compiler_clang.xml (revision 8193)
+++ src/plugins/compilergcc/resources/compilers/compiler_clang.xml (working copy)
@@ -7,6 +7,8 @@
<Search envVar="PATH"
for="C"/>
<if platform="windows">
+ <Search path="%ProgramFiles%\LLVM"
+ for="C"/>
<Fallback path="C:\MinGW"/>
</if>
<else>
--- End code ---
oBFusCATed:
--- Quote from: MortenMacFly on August 06, 2012, 07:13:08 am ---Why would you do that?
--- End quote ---
Because it will be easier in the longer period of time. You won't have to worry if the options is C or C++.
Another benefit is that this will bring us one step closer to multy-language/multi-compiler support in a single project.
--- Quote from: MortenMacFly on August 06, 2012, 07:13:08 am ---MSVC for example is one compiler for all.
--- End quote ---
In fact MSVC is MSVC++, I doubt there is any support for C provided by Microsoft, and if I remember correctly, they stated that C11 won't be supported by them.
Edit: I'm talking about the options added in "compiler->other options", because you can't add "-Werror=return-type" in the normal options. So thinking about this again, splitting the compilers in C and C++ ones is the only available option.
MortenMacFly:
--- Quote from: oBFusCATed on August 06, 2012, 02:03:06 pm ---multy-language/multi-compiler support in a single project.
--- End quote ---
Using different targets and custom build commands we have that already - and I am using it.
But if you believe there is an extra benefit - I won't mind as long as I don't have to open twice as much settings dialogs for a mixed C/C++ project.
--- Quote from: MortenMacFly on August 06, 2012, 07:13:08 am ---I doubt there is any support for C provided by Microsoft,
--- End quote ---
Oh dear... I thought the Windows core was still plain C - it seems it isn't... or they are using another compiler for it.
Alpha:
Here is a patch with an initial implementation for the first option I described (it is functional, but has poor API and is not user configurable). This patch also includes the minor changes from my last post and another logging tweak.
MortenMacFly:
--- Quote from: Alpha on August 07, 2012, 05:30:21 am ---Here is a patch [...]
--- End quote ---
Giving it a try< leads to tons of errors at startup of C::B, that compiler_options_sort.xml could not be fund. Why? Did I forget to copy / create a file?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version