Import CMake Build Tree into Eclipse

22 Views Asked by At

I have a C++ project which I cross-compile for many different HW platforms (x86_64, Raspberry Pi OS, Alpine arm64, ...). As build system I use cmake.

Currently I generate an Eclipse project while running cmake (-G"Eclipse CDT4 - Unix Makefiles"). So an individual Eclipse project is generated for each build configuration. The generated .project I can import into Eclipse easily and successfully. The indexer in Eclipse seems to work fine: I can correctly jump to used header files within each cross compilation sysroot (= different for each build configuration).

Unfortunately since cmake version 3.27 Èxtra Generators feature is deprecated and I am unsure how I will be able to import projects into Eclipse in future?

I know that many other IDE's allow an import of CMakeCache.txt or compile_commands.json, but I did not find any solution for this in Eclipse.

Do you know about any solution? How do you import your cmake projects into Eclipse so that it properly works for each build configuration (esp. jump to correct header files)?

0

There are 0 best solutions below