Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Whats the state of CMake Build Support ?(Whats does work and what should work.)
Whats the state of CMake Build Support ? [message #1764479] Tue, 30 May 2017 12:32 Go to next message
Norbert Lange is currently offline Norbert LangeFriend
Messages: 3
Registered: May 2017
Junior Member
Hello,

since there is a clear lack of any information or documentation about the plugin, the only thing visible is a button to start the CMake GUI. Is this really everything it does now?

I would like to know how the following should work:

- "Seeding" configuration by storing the cmake Variables in a project. This will allow deleting the output folder, and simply starting a new build instead of configuring cmake outside of eclipse. (Like every other builder works)
- Fetching include paths and macros from the toolchain. Its not possible to enable a "Built-in Compiler settings provider", since the entire C/C++ General tree is removed from the properties
- Fetching include paths and macros from the buildsystem (what is defined per file in CMakeLists.txt)

Especially since their apparently arent any providers, the current state of the plugin is actually inferior to using a plain Makefile Project with fitting providers and running CMake yourself.
Re: Whats the state of CMake Build Support ? [message #1764495 is a reply to message #1764479] Tue, 30 May 2017 13:47 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Hi Norbert,

Quote:
Is this really everything it does now?


Could be, the CMake support is work in progress. This has been ongoing for a while. There has been discussion just this week on the topic: https://dev.eclipse.org/mhonarc/lists/cdt-dev/msg32065.html

HTH
Jonah
Re: Whats the state of CMake Build Support ? [message #1764886 is a reply to message #1764479] Fri, 02 June 2017 21:11 Go to previous messageGo to next message
Roman Popov is currently offline Roman PopovFriend
Messages: 1
Registered: June 2017
Junior Member
But how to enable CMake support in Eclipse?

I've installed Eclipse Oxygen RC but I don't see any options how to import CMake project. Neither I've found any CMake plugins in "Help->Install new software"
Re: Whats the state of CMake Build Support ? [message #1765018 is a reply to message #1764886] Mon, 05 June 2017 17:40 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
As CMake is experimental, it is not currently published to the main Eclipse Oxygen release. You can install it from http://download.eclipse.org/tools/cdt/builds/oxygen/milestones/rc2/ (that URL will change as the new release candidates are produced and eventually Oxygen is released). Check back at https://www.eclipse.org/cdt/downloads.php for release version later in June.

Once you install, do New -> C/C++ Project -> CMake and have a go.
Re: Whats the state of CMake Build Support ? [message #1780741 is a reply to message #1764479] Fri, 26 January 2018 13:46 Go to previous messageGo to next message
Stefan Bellus is currently offline Stefan BellusFriend
Messages: 1
Registered: January 2018
Junior Member
Hi

I know that CMake support is experimental (CDT 9.3).
I try it, but may be I do something wrong because basic usage scenarios do not work.

I have project with CMakeLists.txt. I create C/C++ project -> Empty or Existing CMake project.
Some project is generated.

The problems:
- There is no configuration (Debug/Release/Default)
- There is CMake section in project properties but there is only one button Launch CMake Gui.
- In cmake-gui I choose build directory and setup project. BUT build does not work. (I guess eclipse has no chance to figure out where build folder is and what is native bool tool when I set it through cmake-gui)
- No Targets are populated from CMakeLists.txt
- Subdirectories mentioned in CMakeLists.txt are ignored.

What is correct workflow?
Is there any tutorial how to use this eclipse feature?

Best regards
Stevo
Re: Whats the state of CMake Build Support ? [message #1790180 is a reply to message #1764479] Wed, 06 June 2018 14:19 Go to previous messageGo to next message
Steven Clark is currently offline Steven ClarkFriend
Messages: 1
Registered: June 2018
Junior Member
Hi everyone,

Executive summary:
- Intense plea for documentation.
- What and where is cmake-gui?
- How do I get Eclipse to know about Debug and Release configurations?

I've been programming Unix for decades and I finally decided to try an IDE. Eclipse seemed like the right one. In many ways I am amazed at its awesomeness!

I'm starting with a small project that builds with CMake and Ninja. I've spent days trying to figure out a good way to use Eclipse with a CMake project.

It took me over a day to figure out that "cmake4eclipse" and "CMake for CDT" are the same thing, but the new CMake support described in this email is something else. This new CMake support seems to me to be the most promising: it's under active development and it would have Eclipse builds invoking CMake and Ninja rather than Makefiles.

I don't know if it's my poor web searching skills, but I can't find ANY information on how to use this new feature. In Eclipse bug 174176, Doug Shafer writes "I'm going to mark this done. It is quite usable in it's current state." I beg to differ, a feature is not usable if other people don't have the information necessary to use it. (Apologies if I'm just being dense as to how to find it.)

The best information I found so far is in Eclipse bug 532419, in which Martin Oberhuber writes down the steps he took. Until I found that, I had no idea if I was doing the right thing. (I was.)

I am running Eclipse Oxygen.3a (4.7.3a) on Ubuntu 16.04.4. I did File->New->C++ Project and "Empty or Existing CMake Project". Somehow Eclipse figured out two things and I don't know where the information came from:

  1. I create a 'build' subdirectory, go there, and give the cmake command with '..' to pick up the CMakeLists.txt file.
  2. I use -G Ninja to tell CMake to generate Ninja files.

From Eclipse, I can click on the "build all" button and it runs CMake the way I want (if necessary) and then runs Ninja. This is great as far as it goes.

However Eclipse does not know about the standard Debug and Release configurations that CMake provides. I can't select a configuration and I can't create one.

The Project Properties->CMake panel contains nothing but a "Launch CMake GUI" button. Pressing it yields a pop-up stating that cmake-gui cannot be found.

Is the CMake GUI the same as ccmake? I hope not, since ccmake is less convenient than opening CMakeCache.txt in a text editor. Is the CMake GUI the tool that lets me inform Eclipse about my build configurations? If not, then what is?

Thank you for taking the time to read this.

Steve
Re: Whats the state of CMake Build Support ? [message #1791734 is a reply to message #1790180] Wed, 04 July 2018 14:26 Go to previous messageGo to next message
Bernd Doser is currently offline Bernd DoserFriend
Messages: 3
Registered: January 2018
Junior Member
Dear Steve,

switching to the new eclipse photon, I was also starting to investigate the CDT CMake solution. Before that I was using the cmake4eclipse plugin, which is also doing a great job.

CDT is now using the launch bar for building and running projects. For the C++ CMake template project the build is working out of the box. Importing a existing CMake project, I have to add the project nature 'org.eclipse.cdt.cmake.core.cmakeNature'. CMake configurations can be set in the 'Launch Configuration' box (adding CMake variables and switching between Make and Ninja).

The cmake-gui is a binary coming with the CMake installation as a graphical tool to reconfigure CMake variables. I don't need it in the default workflow.

You can start a ready-to-go eclipse photon IDE with the latest versions of gcc, clang, cmake, conan using BrainTwister's docker-devel-env containers at

https://github.com/BrainTwister/docker-devel-env

Best regards,
Bernd
Re: Whats the state of CMake Build Support ? [message #1795068 is a reply to message #1791734] Thu, 13 September 2018 23:01 Go to previous messageGo to next message
Sean Reilly is currently offline Sean ReillyFriend
Messages: 1
Registered: September 2018
Junior Member
Can you elaborate slightly on this part?

"CMake configurations can be set in the 'Launch Configuration' box (adding CMake variables and switching between Make and Ninja)."

It seems like I can get CMake to work "out of the box" if I install Ninja, but I can't figure out how to reconfigure the project (ex: set -DCMAKE_BUILD_TYPE=Debug) or clean the project.

Not only can't I find any documentation on "Launch Configuration", I really can't find any user level documentation on configuring CDT's new Core Build System. Lots of stuff on the API, but nothing user level.



Re: Whats the state of CMake Build Support ? [message #1795569 is a reply to message #1764479] Tue, 25 September 2018 11:26 Go to previous messageGo to next message
Avarro mickllov is currently offline Avarro mickllovFriend
Messages: 2
Registered: September 2018
Junior Member
I'm mainly asking because I am trying to cross-compile libcurl using CMake
now, and am running into trouble (which I'm happy to discuss further in a
separate thread if needed). I'm not sure if I will even be able to succeed
using CMake, Torrent TurboTax Gogoanime first and foremost. If CMake support is still missing critical
features, I'll switch to using buildconf+configure to build curl, and
dismiss the CMake path for now. Otherwise, I'll start a thread detailing my
cross-compiler woes and debug further.

[Updated on: Wed, 26 September 2018 17:49]

Report message to a moderator

Re: Whats the state of CMake Build Support ? [message #1795818 is a reply to message #1764479] Sun, 30 September 2018 01:53 Go to previous messageGo to next message
Paul Morro is currently offline Paul MorroFriend
Messages: 2
Registered: September 2018
Junior Member
While I'm agree with your flow, I don't think we need to have some vcpkg file here.

I mean vcpkg is a tools by Microsoft to fix their own package management issue (yes it's multi platform but we don't wait them to build some tools)...
I mean on GNU/linux distro you already have package manager and on MacOS you have homebrew
So objective is for OR-Tools C++ deliveries:

Linux Distro Package for Linux
Homebrew formula for MacOS (which should be in homebrew/homebrew-core)
vcpkg for Windows
Further more Microsoft provide a repo (i.e. Microsoft/vcpkg) for all package recipe (like homebrew)
Re: Whats the state of CMake Build Support ? [message #1796609 is a reply to message #1795068] Tue, 16 October 2018 13:19 Go to previous messageGo to next message
J B is currently offline J BFriend
Messages: 2
Registered: July 2009
Junior Member
Sean Reilly wrote on Thu, 13 September 2018 23:01

It seems like I can get CMake to work "out of the box" if I install Ninja, but I can't figure out how to reconfigure the project (ex: set -DCMAKE_BUILD_TYPE=Debug) or clean the project.


I'm in the same boat. It's very difficult to search for information because most of the hits are about the older CMake plugins and not the newer built-in integration. If anyone knows of any documentation please share!
Re: Whats the state of CMake Build Support ? [message #1853425 is a reply to message #1796609] Fri, 01 July 2022 12:21 Go to previous message
Jose Sally is currently offline Jose SallyFriend
Messages: 1
Registered: July 2022
Junior Member
I've been programming Unix for decades and I finally decided to try an IDE. Eclipse seemed like the right one. tellculvers com survey taco bell breakfast hours

[Updated on: Sat, 02 July 2022 09:38]

Report message to a moderator

Previous Topic:Map file viewer bug
Next Topic:undefined reference to `sin'
Goto Forum:
  


Current Time: Thu Mar 28 17:06:47 GMT 2024

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

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

Back to the top