User forums > Using Code::Blocks
errors not clickable for cmake generated project using ninja or make
oBFusCATed:
--- Quote from: fruitCode on December 19, 2019, 05:27:31 pm ---Is it capable of processing multiple lines?
--- End quote ---
I don't think this is possible. The compiler output is processed line by line. Generally GCC and Clang also have moved to multiline error message, so we'll have to tackle this problem sooner or later.
fruitCode:
Allright, no multi-line processing yet.
To complete this post for later reference; I could not find references for CMAKE_CODEBLOCKS_COMPILER_ID in the manual. But they are just sequence numbers from the compiler list that you see in codeBlocks when selecting a compiler for your project. In my case "IAR ARM Compiler" is the 29th entry in the list so I added the following line to my CMakeLists,txt and that works like a charm!
SET(CMAKE_CODEBLOCKS_COMPILER_ID 28)
(Note: entry number is 28 because list count starts at 0)
oBFusCATed:
Hm, this is bad. It should be the short string as stored in the project file.
fruitCode:
You are right, I was mistaken.
What you have to add to your cmake file is:
SET(CMAKE_CODEBLOCKS_COMPILER_ID "iararm" CACHE STRING "Preferred codeblocks compiler ID")
This will generate a codeblocks project file where the compiler is set as IAR ARM
fruitCode:
Another update here for future reference. I had a look at the sources of codeblocks, it seems that error regex parsing is done per line. So to my opinion its not a quick fix to have multi-line regex processing as it takes quite some edits..
In the meantime I found a work-around, the IAR ARM compiler (iccarm) has an option --no_wrap_diagnostics that forces the error messages to be one line. The corresponding regex is then:
"(.*)",([0-9]+)[ \t]+Error\[(.*)\]:[ \t]*(.*)
Where the sub-expression indices are:
Message: 3
Additional message: 4
Filename: 1
Line: 2
Hope this helps others while configuring for IAR ARM
Navigation
[0] Message Index
[*] Previous page
Go to full version