Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Source files not being parsed in imported cmake project
Source files not being parsed in imported cmake project [message #1848950] Sun, 26 December 2021 20:10 Go to next message
John Glen is currently offline John GlenFriend
Messages: 7
Registered: December 2021
Junior Member
I have imported a cmake project into Eclipse. I created a builder that builds all the targets in the cmake. This works, but I have to use the Project->Build All from the toolbar to get it to build. The build button in the toolbar does nothing.

Then when I run or debug, Eclipse runs the last built executable instead of rebuilding. I see a section in the C++ Application configuration called Build (if required) before launching, but I do not see how I can tell it to run the build configuration that is working. I can click Build Configuration and see that the builder is listed, so why isn't it run?

Then Eclipse autocomplete is bare bones, no imports, no members or functions, just C++ keywords. So the static analysis is completely missing from all the source files. This leads me to believe that I need to tell Eclipse where the source files are, but I can not figure out how to do that.

How do I get this working?

Re: Source files not being parsed in imported cmake project [message #1848951 is a reply to message #1848950] Sun, 26 December 2021 20:22 Go to previous messageGo to next message
John Glen is currently offline John GlenFriend
Messages: 7
Registered: December 2021
Junior Member
There is also no option to index
Re: Source files not being parsed in imported cmake project [message #1848952 is a reply to message #1848951] Sun, 26 December 2021 20:27 Go to previous messageGo to next message
John Glen is currently offline John GlenFriend
Messages: 7
Registered: December 2021
Junior Member
I got the indexing to work by importing as makefile project but I am still getting the build and run issues
Re: Source files not being parsed in imported cmake project [message #1848953 is a reply to message #1848952] Sun, 26 December 2021 20:36 Go to previous message
John Glen is currently offline John GlenFriend
Messages: 7
Registered: December 2021
Junior Member
Okay, I got it working. I now have access to C++ Build since importing as a Makefile project, and set the build directory to the build folder where cmake generated the makefiles. and then created a run configuration that points to the desired executable. Now the build button works and it builds before running.
Previous Topic:CMake Unresolved inclusion: <iostream>
Next Topic:Using the C++ code formatter from a terminal
Goto Forum:
  


Current Time: Mon Sep 26 13:57:52 GMT 2022

Powered by FUDForum. Page generated in 0.02166 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top