RE: [CMake] cmake support Eclipse
I also think that Cmake, Ant and Eclipse are complementary. Each does an excellent job for what it is designed to do. I would extend Mikes list of features for Cmake eclipse integration: 1) CMakeErrorParser: This would add cmake build errors to the Problem view in eclipse. This means that when make calls cmake during the build, if there are errors in the cmake file, these errors appear in the problem view. Double clicking on a cmake error in the list would bring the user to the location of the error in the approprte cmake file. I have a created a proof of concept plugin for this however I currently do not have time to finish it. If anyone is interested in looking at the code to do this send me an email and I will forward it on. 2) A Cmake ant task: This would allow developers to easily call cmake to generate make files from within an ant script. Cmake and make are great at building c++ (and other gcc languages), however for large build env with lots of project types ant is great at gluing it all together (as well as just building java). We have used ant to automate the build of our (500+) VC++ projects for the last three years. I am currently moving some of these projects to Cmake to support a unix port, my next phase is to integrate Cmake with our existing ant build. I am sure I can use an exec task but a dedicated task would be much nicer. Here is a rough outline of what I mean, there are probably some gaps here so don't be too critical. The first task cmake calls cmake to generate the make files or projects. The second task cmakebuild knows what build type cmake has generated and how to execute that build. Eg target name=buildCPlusPlus cmake srcdir=cplusplus/source bindir=cplusplus/buildoutput / cmakebuild bindir=cplusplus/buildoutput / /target Iain. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Jackson Sent: 31 July 2007 15:42 To: Cmake Mailing List; Mike Jackson Subject: Re: [CMake] cmake support Eclipse These are my _thoughts_ on what I would like to see as a first cut at CMake/Eclipse integration. As someone has already done in the past day, basically have cmake generate a CDT Makefile project that sets up the .project/.cproject files for eclipse to invoke make on the makefiles that are generated by Cmake. I think this is going to be the best way to go about this due to limitations on how a ManagedMakefile project is used in Eclipse. Also, if the include paths can be preset in the eclipse project file based on what is in the CMakeLists.txt file this is one more added bonus. Add into the project file the exectuables so I don't have to add them in eclipse each time. Next, Implement the ccmake program as an Eclipse Plugin so that I can run ccmake from within eclipse. The interface that our windows brethren get with CMakeSetup would suffice for this. This plugin is written in Java and would use the Eclipse PDE as its project management. Version 3: Implement some CMake Wizards that would help a cmake newbie generate a basic CMakeLists.txt file. These wizards are just for basic projects and help to generate a properly working CMakeLists.txt file. After that the programmer can use the cmake documentation to enhance/add-to their cmake files. All this would be a great start. I agree with an earlier posting about trying to have eclipse use CMake for its project management. It is going to be a long difficult road. If the above it completed first, and done well, then you have a decent chance of getting the CDT project leads behind CMake. BTW, the project leads do embedded C/C ++ development so getting them to switch to CMake would be a great first step.. ;-) Again, these are just my thoughts on what I would like to see in an Eclipse Generator -- Mike Jackson Senior Research Engineer Innovative Management Technology Services ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] cmake support Eclipse
1) CMakeErrorParser... I have a created a proof of concept plugin for this however I currently do not have time to finish it. If anyone is interested in looking at the code to do this send me an email and I will forward it on. I am looking at the CMake Editor Plug-in. now and will submit my CMakeErrorParser as it stands as a patch for this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iain Hull Sent: 01 August 2007 10:12 To: Mike Jackson; Cmake Mailing List; Mike Jackson Subject: RE: [CMake] cmake support Eclipse I also think that Cmake, Ant and Eclipse are complementary. Each does an excellent job for what it is designed to do. I would extend Mikes list of features for Cmake eclipse integration: 1) CMakeErrorParser: This would add cmake build errors to the Problem view in eclipse. This means that when make calls cmake during the build, if there are errors in the cmake file, these errors appear in the problem view. Double clicking on a cmake error in the list would bring the user to the location of the error in the approprte cmake file. I have a created a proof of concept plugin for this however I currently do not have time to finish it. If anyone is interested in looking at the code to do this send me an email and I will forward it on. 2) A Cmake ant task: This would allow developers to easily call cmake to generate make files from within an ant script. Cmake and make are great at building c++ (and other gcc languages), however for large build env with lots of project types ant is great at gluing it all together (as well as just building java). We have used ant to automate the build of our (500+) VC++ projects for the last three years. I am currently moving some of these projects to Cmake to support a unix port, my next phase is to integrate Cmake with our existing ant build. I am sure I can use an exec task but a dedicated task would be much nicer. Here is a rough outline of what I mean, there are probably some gaps here so don't be too critical. The first task cmake calls cmake to generate the make files or projects. The second task cmakebuild knows what build type cmake has generated and how to execute that build. Eg target name=buildCPlusPlus cmake srcdir=cplusplus/source bindir=cplusplus/buildoutput / cmakebuild bindir=cplusplus/buildoutput / /target Iain. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Jackson Sent: 31 July 2007 15:42 To: Cmake Mailing List; Mike Jackson Subject: Re: [CMake] cmake support Eclipse These are my _thoughts_ on what I would like to see as a first cut at CMake/Eclipse integration. As someone has already done in the past day, basically have cmake generate a CDT Makefile project that sets up the .project/.cproject files for eclipse to invoke make on the makefiles that are generated by Cmake. I think this is going to be the best way to go about this due to limitations on how a ManagedMakefile project is used in Eclipse. Also, if the include paths can be preset in the eclipse project file based on what is in the CMakeLists.txt file this is one more added bonus. Add into the project file the exectuables so I don't have to add them in eclipse each time. Next, Implement the ccmake program as an Eclipse Plugin so that I can run ccmake from within eclipse. The interface that our windows brethren get with CMakeSetup would suffice for this. This plugin is written in Java and would use the Eclipse PDE as its project management. Version 3: Implement some CMake Wizards that would help a cmake newbie generate a basic CMakeLists.txt file. These wizards are just for basic projects and help to generate a properly working CMakeLists.txt file. After that the programmer can use the cmake documentation to enhance/add-to their cmake files. All this would be a great start. I agree with an earlier posting about trying to have eclipse use CMake for its project management. It is going to be a long difficult road. If the above it completed first, and done well, then you have a decent chance of getting the CDT project leads behind CMake. BTW, the project leads do embedded C/C ++ development so getting them to switch to CMake would be a great first step.. ;-) Again, these are just my thoughts on what I would like to see in an Eclipse Generator -- Mike Jackson Senior Research Engineer Innovative Management Technology Services ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse CDT
2007/7/31, Brandon Van Every [EMAIL PROTECTED]: On 7/30/07, Andreas Pakulat [EMAIL PROTECTED] wrote: Of course CDT still uses the java-written eclipse platform sdk, but it doesn't have anything else to do with Java. So you're writing a plugin in Java to integrate CMake with Eclipse. Well, don't you think you should use CMake to build the Java plugin? No certainly not. You are building an ECLIPSE plugin. You should use Eclipse for it. CMake may generate the project file for that but I think this should not be a primary target. If you use some non-CMake tool to build the CMake support, you risk CDT developers saying what is this lame CMake build system that can't even handle Java? We'd rather support Ant. The CMake vs Ant comparison is misleading. As far as I know Ant is not able to generate Visual Studio project files nor KDevelop project file or even Eclipse Project file either!! I think Ant will never go along this path. Ant is a better make geared toward java build and does not compare to CMake. When you build an Eclipse Plugin you SHOULD use Eclipse because it was built just for that (being extensible with plugin). Trying to get CMake into the middle seems awkward to me. Would you use CMake to build a GUI you build with Visual Studio or Glade? I'm an advocate of the right tool for the appropriate task don't try to get CMake do everything one may need. -- Erk ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
I have been following this thread and I guess it is time to chime it a bit with what I know. First my background. I used Eclipse since '03 for Java development then switched in mid '06 to C++ development with Eclipse/CDT so I have a fair amount of experience with Eclipse, Ant and about a year of full time CDT and CMake. I am just going to rattle off some answers/corrections to the various items that have been posted in this thread: Eclipse Plugin Development: Usually you develop a plugin for Eclipse using their PDE (Plugin Development Environment). This is almost certainly going to be written in Java with maybe a small JNI module if you absolutely need to jump across the Java/Native bridge to do something in the C++ world. Eclipse will manage the build of your plugin using what ever build mechanism Eclipse uses for Java. CDT Projects: There are 2 kinds of CDT projects; 'Managed Makefile' and 'Makefile'. In the 'Managed Makefile' project Eclipse basically does the project management for you and then creates a Makefile behind the scenes and then invokes that makefile to build your project. In a 'Makefile' project you bring your own makefile to the project. CDT just provides the IDE environment. The major downside to the 'Managed Makefile' project is that there is really only 1 'Target' in your project, so anything past a basic hello World or Hello Library is beyond the capability of CDT (at least how I understand it), which is why I am guess that most people use the Makefile project so they can have 1 project with lots of targets ( Library, Executable, Testing harness). Right Tool for the Right Job: As stated in previous messages, CMake is a great Generator of 'project files' ( Makefile, Xcode, VS, Nmake) for typically C/C++ projects. ( I have no experience with any other language + CMake). Ant is a just as awesome build system for Java. Use the right tool for the right job. If I am doing Java Dev, CMake will NEVER enter the picture. If I am doing C/C++ dev then Ant will NEVER enter the picture. If CMake generated an Ant xml file for java projects then you may be onto something. Cmake File Editing: There is a plugin at http://www.cthing.com/ CMakeEd.asp that adds a nice editor to Eclipse that makes editing CMake files easier. It offers syntax highlighting, command completion and integrated documentation. Very nicely done. Current CMake/Eclipse Integration: http://www.cmake.org/Wiki/ CMake:Eclipse (which I wrote) goes over the current state of affairs in using CMake with Eclipse. Generally after bootstrapping the process things are pretty smooth as cmake will make sure your makefiles are up to date if you change the CMakeLists.txt file. Where things are NOT smooth is if you are making MAJOR changes to your CMakeLists.txt files then I find that I need to use an external Terminal program to clean things out and re-invoke ccmake to set my project up again. On the Eclipse download page http://www.eclipse.org/downloads/ there is a specific selection to download just the base eclipse + CDT without all the extra java IDE stuff. This works rather nicely. If you need to have some XML editing capability (say for paraview development) then you can easily download the proper XML editors for that function. opinionCMake would have an extremely difficult time luring java developers from Ant or Maven to use Cmake for a build system and vice versa, Ant would have a difficult time luring c/c++ developers from cmake. Each party should concentrate on what they do best./opinion Sorry for top posting.. -- Mike Jackson Senior Research Engineer Innovative Management Technology Services On Jul 31, 2007, at 3:05 AM, Eric Noulard wrote: 2007/7/31, Brandon Van Every [EMAIL PROTECTED]: On 7/30/07, Andy Dingfelder [EMAIL PROTECTED] wrote: Building java apps it typically done using Maven or Ant, and I see no need to re-invent the wheel and use cmake to do that. I do. If you want Eclipse developer mindshare, then ultimately you want CMake to work as a Java build tool as well. I'm following this interesting thread and here I must say that I disagree. CMake I think should never became A Java build tool CMake may add java support which may end up in generating ant build files. Ant is a build tool which may be compared to make (ant is much much much nicer and powerful than make though) CMake (from my point of view) is a build tool GENERATOR. You may not need any of that at first, but you aren't going to get a snowball of support unless CMake is handling basic Java builds. That's the strategic risk. Strategically, if Ant figures out how to do C/C++, Ant already does, see cc Task: http://ant-contrib.sourceforge.net/cc.html and CMake doesn't figure out how to do Java, then CMake will lose in the Eclipse world. Not so sure, even if I'm no eclipse expert. If CMake is able to generate Eclipse project files
Re: [CMake] cmake support Eclipse
2007/7/31, Brandon Van Every [EMAIL PROTECTED]: On 7/31/07, Eric Noulard [EMAIL PROTECTED] wrote: 2007/7/31, Brandon Van Every [EMAIL PROTECTED]: and CMake doesn't figure out how to do Java, then CMake will lose in the Eclipse world. Not so sure, even if I'm no eclipse expert. If CMake is able to generate Eclipse project files and/or with eventual Ant build files then I'm pretty sure CMake will get in the Eclipse world very soon. Oh come on, you think anyone's going to bother to support such major tasks if CMake doesn't speak Java reasonably well? Yes I think a lot of Eclipse/CDT user won't ever need CMake Java support. I think you underestimate what Ant and the wealth of optional tasks are able to do, I suggest you go to http://ant.apache.org/manual/ and browse tasks. You'll see that high level ant tasks enables you to do ftp, ssh, scp, cvs, subversion, rpm building in a easy way. As far as I know CMake does not have those capabilities. ADD_CUSTOM_TARGET ADD_CUSTOM_TARGET and/or EXECUTE_PROCESS won't be as portable and as powerful as a custom Ant task can be. From within ADD_CUSTOM_TARGET you have limited programmatic possibility in comparison with Java used for custom ant task. From my experience I have to write platform specific ADD_CUSTOM_TARGET for different platforms, at least one for Windows and one for Un*x whereas custom ant task may be written in a java-portable fashion. Be assured I am a pro-cmake user, but I look at CMake and Ant with a different point if view. -- Erk ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
These are my _thoughts_ on what I would like to see as a first cut at CMake/Eclipse integration. As someone has already done in the past day, basically have cmake generate a CDT Makefile project that sets up the .project/.cproject files for eclipse to invoke make on the makefiles that are generated by Cmake. I think this is going to be the best way to go about this due to limitations on how a ManagedMakefile project is used in Eclipse. Also, if the include paths can be preset in the eclipse project file based on what is in the CMakeLists.txt file this is one more added bonus. Add into the project file the exectuables so I don't have to add them in eclipse each time. Next, Implement the ccmake program as an Eclipse Plugin so that I can run ccmake from within eclipse. The interface that our windows brethren get with CMakeSetup would suffice for this. This plugin is written in Java and would use the Eclipse PDE as its project management. Version 3: Implement some CMake Wizards that would help a cmake newbie generate a basic CMakeLists.txt file. These wizards are just for basic projects and help to generate a properly working CMakeLists.txt file. After that the programmer can use the cmake documentation to enhance/add-to their cmake files. All this would be a great start. I agree with an earlier posting about trying to have eclipse use CMake for its project management. It is going to be a long difficult road. If the above it completed first, and done well, then you have a decent chance of getting the CDT project leads behind CMake. BTW, the project leads do embedded C/C ++ development so getting them to switch to CMake would be a great first step.. ;-) Again, these are just my thoughts on what I would like to see in an Eclipse Generator -- Mike Jackson Senior Research Engineer Innovative Management Technology Services ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse CDT
On 7/30/07, Andreas Pakulat [EMAIL PROTECTED] wrote: Of course CDT still uses the java-written eclipse platform sdk, but it doesn't have anything else to do with Java. So you're writing a plugin in Java to integrate CMake with Eclipse. Well, don't you think you should use CMake to build the Java plugin? If you use some non-CMake tool to build the CMake support, you risk CDT developers saying what is this lame CMake build system that can't even handle Java? We'd rather support Ant. We're talking about inculcating CMake into the Eclipse culture here. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
On 7/30/07, Andy Dingfelder [EMAIL PROTECTED] wrote: You are correct in your thoughts that the individual who writes a cmake plugin would need to know java. Yes as you point out there is always a risk that perhaps cmake will not be up to the task of large scale cross platform development and perhaps the individuals who work to get it integrated will get annoyed and not support it, but given the size of the CDT userbase I think there are enough eclipse using c++ users out there to take the risk. I am not familiar with all the ins and outs of cmake but I suspect it is up to the task, and any issues would just be implementation details to work out. What's a non-trivial Java app that's using a CMake build? Dart2 server perhaps? My thoughts were that ant was more java centric, whereas cmake is c++ centric and would be a better fit for the CDT. CMake only has to be elegant enough to address the needs of a CDT implementor. Which might be substantial, actually, I don't know. Eclipse is a big project. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
What's a non-trivial Java app that's using a CMake build? Dart2 server perhaps? I don't know any java apps that are built using cmake if thats what you mean. Building java apps it typically done using Maven or Ant, and I see no need to re-invent the wheel and use cmake to do that. All cmake needs to do to meet my needs is build C++ code, which it does very well from what I have seen. CMake only has to be elegant enough to address the needs of a CDT implementor. Which might be substantial, actually, I don't know. Eclipse is a big project. I do not see what the size of eclipse has to do with how cmake would work. The point I was making before is that the implementor who tries to integrate cmake into CDT would treat it the same way that the maven plugin developers treated maven... They made the plugin use the build system as is instead of trying to make it fit Eclipse, so that builds done from within the IDE could also still be done from the command line. In the same sense, I do not think cmake should change to meet Eclipse's needs, therefore the elegance of cmake is not the question. If cmake becomes more elegant, so much the better, but it should not be done to make the CDT better, it should be done for cmake as a whole. My vision for a cmake plugin would be as an administrative tool that eases the creation of the CMakeLists.txt file and the running of ccmake. Basically, there would be a GUI screen or wizard that would ask questions such as what OS you want to target, what files to include, and what toolchain to use, and then you could simply tell eclipse to do a build and it would use cmake to build all the appropriate targets. WARNING: This email and any attachments may be confidential and/or privileged. They are intended for the addressee only and are not to be read, used, copied or disseminated by anyone receiving them in error. If you are not the intended recipient, please notify the sender by return email and delete this message and any attachments. The views expressed in this email are those of the sender and do not necessarily reflect the official views of Landcare Research. SirTrack http://www.sirtrack.com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
On 31.07.07 12:12:17, Andy Dingfelder wrote: My vision for a cmake plugin would be as an administrative tool that eases the creation of the CMakeLists.txt file and the running of ccmake. Basically, there would be a GUI screen or wizard that would ask questions such as what OS you want to target, what files to include, and what toolchain to use, and then you could simply tell eclipse to do a build and it would use cmake to build all the appropriate targets. There's one problem with this GUI approach: It never scales, especially for buildsystems such as CMake. I've written a good part of KDevelop3's QMake Manager (a GUI on top of the QMake buildsystem, which is more limited than CMake and the advanced features are also not so well known) and one thing I've learned is: You can provide a good GUI for beginners who just want to add a bunch of files and get a binary/library. Even adding includes and libraries can be made to work with a GUI (as in lists, editlines, fileselectors). But for real world complex projects that utilize such buildsystem to their full extent another approach seems much more promising (instead of trying to squeeze each aspect of the language into a GUI): Treat it as a language, that is let the user write the CMakeLists.txt files directly, but provide help in editing them. For CMake this means syntax highlighting, completion of macro's, suggesting possible options and so on. Andreas -- Do something unusual today. Pay a bill. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] cmake support Eclipse
On 7/30/07, Andy Dingfelder [EMAIL PROTECTED] wrote: What's a non-trivial Java app that's using a CMake build? Dart2 server perhaps? I don't know any java apps that are built using cmake if thats what you mean. Looks like Dart2 is an Ant project. VTK has a Java wrapper but it doesn't use PROJECT(myproj Java) to do any of the wrapping. I do see one Java test in the CMake source tree that uses PROJECT(blah Java). It makes a Hello World with essentially one command, ADD_LIBRARY(hello A.java HelloWorld.java). I don't know beans about Java; is everything in Java a library? I guess you don't have binary executables, so no ADD_EXECUTABLE, but it seems funny to call hello a library. Building java apps it typically done using Maven or Ant, and I see no need to re-invent the wheel and use cmake to do that. I do. If you want Eclipse developer mindshare, then ultimately you want CMake to work as a Java build tool as well. You may not need any of that at first, but you aren't going to get a snowball of support unless CMake is handling basic Java builds. That's the strategic risk. Strategically, if Ant figures out how to do C/C++, and CMake doesn't figure out how to do Java, then CMake will lose in the Eclipse world. All cmake needs to do to meet my needs is build C++ code, which it does very well from what I have seen. You may want to look beyond your immediate needs though. You started this thread with thoughts of what's profitable to strategically invest in. I certainly wouldn't begrudge you knocking out *any* form of CMake Eclipse plugin. This is open source, so whatever turns you on. But some approaches are more likely to get accepted by large numbers of people than others. Bootstrapping CMake is more cool than using Ant to take care of what CMake is supposed to take care of. Coolness inspires. CMake only has to be elegant enough to address the needs of a CDT implementor. Which might be substantial, actually, I don't know. Eclipse is a big project. I do not see what the size of eclipse has to do with how cmake would work. I do not know what Java trickery one needs to do to build an Eclipse plugin. I hope it is easy and aesthetically satisfying when done with CMake. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake