CLion EAP, Makefiles and how to point it to .pcms for C++ modules?
I just downloaded the CLion Nova EAP. Before doing that, I have been using main-branch Clang, Makefiles, and C++20 modules, so I tried opening one of these directories to see what the IDE could do. It seems better than the CLion I tried about a year ago. Within a Makefile project, it is parsing the module files and handling things pretty well so far. But if I import foo;
where foo points to a library I compiled in another project/directory, CLion highlights the name “foo” in red and it isn't finding any of the symbols from that module. The Makefile works because it passes -fprebuilt-module-path=path/to/foo
to Clang, which points it to the .pcm files for foo
. That flag is documented here.
Is there a way to give that info to CLion so it can find the imported module?
Please sign in to leave a comment.
If I can make this work by using a compilation database json file, that would be great too. I don't need to use Make, but I wanted to avoid CMake.
I was mistaken in main post. Nothing seems to be working with modules. Imports from other projects, or imports of units within the same project. My Makefile compiles fine, but almost nothing works for auto-completion or jumping to symbols in the IDE. Lots of red highlights. I guess it just doesn't work for C++20 modules. I don't see any settings or anything I can adjust or tinker with to try to get it working.