User forums > Using Code::Blocks

errors not clickable for cmake generated project using ninja or make

<< < (3/4) > >>

stahta01:

--- Quote from: fruitCode on December 16, 2019, 05:39:06 pm ---To be clear, I want C::B to build my project still to be build using the makefile/ninja file (generated via cmake) as my project also runs on a jenkins build server.
When fixing some errors, doing changes I want to use C::B IDE (locally)

--- End quote ---

Do you expect the errors to be clickable and go to code line with error?

Edit: Remove part of the quote because it might mislead.

Tim S.

oBFusCATed:

--- Quote from: fruitCode on December 16, 2019, 05:39:06 pm ---Any hints where to find info on how to make an IAR setup? Glad to make one.. Checked the help of C::B but there I could'nt find it, or I overlooked..?

--- End quote ---
Probably start with these files:

share/codeblocks/compilers/options_common_re-iar.xml
share/codeblocks/compilers/options_iar8051.xml
share/codeblocks/compilers/options_iararm.xml

stahta01:

--- Quote from: stahta01 on December 16, 2019, 09:21:00 pm ---
--- Quote from: fruitCode on December 16, 2019, 05:39:06 pm ---To be clear, I want C::B to build my project still to be build using the makefile/ninja file (generated via cmake) as my project also runs on a jenkins build server.
When fixing some errors, doing changes I want to use C::B IDE (locally)

--- End quote ---

Do you expect the errors to be clickable and go to code line with error?

Edit: Remove part of the quote because it might mislead.

Tim S.

--- End quote ---

I just tried building wxWidgets samples using the wxWidgets makefiles and it worked after I added the files
to the CB project. Did you try that?

It worked means the errors were clickable and opened the files.

Edit2: I am using the native makefile.gcc not ones made by cmake.

Tim S.
 

stahta01:
And, the clickable error/warning requires a valid filename and line number in the first two columns of the "build messages".

Edit: The file path if relative likely needs to be relative to the CB project file location.
If not relative, needs to be in the CB project and likely needs to be the only one with that filename.

Tim S.

fruitCode:
@oBFusCATed Thanks for hinting me about those xml files. Then I noticed there is already the IAR ARM compiler defined, just what I need..

Q1: Where to find the ID number for that compiler setting to be used for CMAKE_CODEBLOCKS_COMPILER_ID ?

When is set this compiler for my project it still didn't work.
Then I went to menu Settings->Compiler
Selected "IAR ARM Compiler" as the selected compiler
Went to the tab "Other settings" and click button "advanced options..."
Click tab "Output parsing"
Then I adjusted the regular expression for "Compiler error" to "(.*)",([0-9]+)[ \t]+Error\[(.*)\]:.*" and then it works
I don't know what regex was there by default but it makes no sense to me...?

Q2: How to parse multi line error messages? The messages are spanned over 3 lines, first line contains file name and line number, second line contains the actual error message and the thirdth line contains the source line where the error is about. I need to match the second line to get the error message.. Tried to use \n in the regex but that didn't work. is it capable of processing multiple lines?

Thanks so far! it really helped me forward.
<rant> Tried the bloated eclipse in the meantime but that was a bad adventure.. Huge download, slow performance and it didn't work either.. (that is error clickable) despite I installed the error parsers provided by IAR. Found some hints on eclipse forums but the interface was totally changed so they were unusable <\rant>

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version