Completion / Intellisense / Build-Process with Cross-Compiler Makefile on WSL2

OK, I realise I have a fairly specific set of needs, but I *love* Rider for my C# work and am hoping to achieve what I want with CLion for my C++ hobbyist project.

I'm doing hobbyist OS development and am using x86-64-elf and arm-none-eabi GCC cross-compilers on WSL2. I use Makefiles and on this project I've been working on-and-off for years, have a nice Makefile set that does exactly what I want. If I *had* to move over to CMake I would, but trying not to learn another tool right now.

I've followed articles on this site for getting CLion working with WSL2 and also with Makefiles. I have a top-level Makefile which includes other Makefiles depending on the selected target.

Problem is, CLion complains that my Makefile does not include an "all" target (which it definitely does) or a "clean" target (which it also does) - I get red and yellow messages in the output window. In addition, I have no apparent automatic scanning of headers for code completion or intellisense (other than a very narrow subset of my project). I have no simple way to just click "Build" or "Run" to run my project in Qemu, which is where I test the disk image created by my Makefile.

Currently, I'm using VSCode which seems to detect everything OK but doesn't have all the features I've come to love with Rider - I'm very keen to move over to CLion for my C++ if I can do.

Any ideas how I might make the system work for me? Happy to provide more information if possible.

0
1 comment

Hello!

Problem is, CLion complains that my Makefile does not include an "all" target (which it definitely does) or a "clean" target (which it also does)

  1. Is it possible to share the top-level Makefile?
  2. Please do Tools | Makefile | Clean and Reload Makefile Project, right-click in the Build tool window, enable the "Show Successful Steps" option, and send us a screenshot of the Build tool window. Also please click on the "Collecting project information" step and share the entire output of this step as text. 
0

Please sign in to leave a comment.