Author Topic: errors not clickable for cmake generated project using ninja or make  (Read 460 times)

Offline fruitCode

  • Single posting newcomer
  • *
  • Posts: 7
Hello,

I have a project that is set-up for cmake. Cmake offers the possibility to generate a project file for codeBlocks.
When I generate a project file and open it I see my project files in the Projects workspace tree.
I can also trigger a project compilation by hitting CTRL-F9, it works like a charm.
I get some build errors in the "Build log" window in the bottom of the screen but I cannot click them. I expect that I can click them and that codeBlocks will open that specific file at the line where the error is reported.
I tried this using ninja and make as a build tool, both result in errors not being clickable.
An error looks like this:
"D:\Sources\git-repos\g0046-acu-mh_firmware_acm_2\03_Modules\01_CU_PlatForm\03_Implementation\include\ghdr\Compiler.h",27  Error[Pe020]:
          identifier "__huge" is undefined
  extern __huge U8BIT *CUBaseAddress;


I've used codeBlocks quite a lot in the past and I remembered this was working. Am I wrong? Are there any settings involved that can screw this up?

I tried using codeBlocks 17.12 and 13.12, both the portable version.

thanks

My question is: is

Offline fruitCode

  • Single posting newcomer
  • *
  • Posts: 7
Re: errors not clickable for cmake generated project using ninja or make
« Reply #1 on: November 15, 2019, 05:45:05 pm »
I see my post was cut-off somehow..
So my question is: should it work? (clickable errors) and are there any settings related that can influence this behavior? (incorrect settings screwing this up)

Online stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: errors not clickable for cmake generated project using ninja or make
« Reply #2 on: November 15, 2019, 07:51:34 pm »
Are you using a normal CB project or a custom makefile cb project?

I believe that feature is not supported with custom makefile cb projects.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline osdt

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: errors not clickable for cmake generated project using ninja or make
« Reply #3 on: November 15, 2019, 08:33:17 pm »
AFAIK this feature was never implemented for the "Build log". Use the "Build messages" tab to have CB show the file/line in question.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12123
    • Travis build status
Re: errors not clickable for cmake generated project using ninja or make
« Reply #4 on: November 16, 2019, 10:55:54 am »
What is the compiler which you're using? The errors/warnings are detected using regular expressions. Most probably none of the regexs matches the line you've posted.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline fruitCode

  • Single posting newcomer
  • *
  • Posts: 7
Re: errors not clickable for cmake generated project using ninja or make
« Reply #5 on: November 18, 2019, 10:47:21 am »
Are you using a normal CB project or a custom makefile cb project?

I believe that feature is not supported with custom makefile cb projects.

Tim S.

I use a CB project file that is generated by the cmake utility so I guess its a custom one. I use cmake because I build for different targets (PC host for unit and integration tests and a simulator application) and an embedded target running on an ARM processor. Cmake is a great utility to assist in these kind of setups besides that it offers out of source building.

Offline fruitCode

  • Single posting newcomer
  • *
  • Posts: 7
Re: errors not clickable for cmake generated project using ninja or make
« Reply #6 on: November 18, 2019, 10:48:51 am »
AFAIK this feature was never implemented for the "Build log". Use the "Build messages" tab to have CB show the file/line in question.

In doesn't work in that tab either

Offline fruitCode

  • Single posting newcomer
  • *
  • Posts: 7
Re: errors not clickable for cmake generated project using ninja or make
« Reply #7 on: November 18, 2019, 10:54:49 am »
What is the compiler which you're using? The errors/warnings are detected using regular expressions. Most probably none of the regexs matches the line you've posted.

I am porting code from V850 to ARM, I use an IAR compiler but as an alternative path I also use the GCC ARM compiler (as cmake makes it really easy to have these different setups with fi different compilers for same project - yes I am a fan of it)
Your comment made me think so I tried with the GCC ARM compiler and yes, there it works like a charm. Thanks for hinting!

My conclusion is that the regex don't seem to match the IAR syntax

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12123
    • Travis build status
Re: errors not clickable for cmake generated project using ninja or make
« Reply #8 on: November 18, 2019, 07:44:36 pm »
You can add a IAR compiler and then you can tell cmake to use it as the compiler for your project. See https://cmake.org/cmake/help/v3.16/variable/CMAKE_CODEBLOCKS_COMPILER_ID.html

If you make a IAR setup we'll be happy to review and accept a patch. :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]