Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Git not available for an imported CMake project(Git not available for an imported CMake project)
Git not available for an imported CMake project [message #1752344] Sun, 22 January 2017 16:23 Go to next message
Kustaa Nyholm is currently offline Kustaa NyholmFriend
Messages: 5
Registered: January 2017
Junior Member
I've used EGit for Java projects for years without issues.

Now I imported a C/C++ CMake project that checked out from Github using command line git into my workspace and the Package Explorer -> Team menu only shows Apply Patch ... / Share Project for the project. Also no '>' is shown to left of the project name in the Package Explorer.

If I try to Share Project the wizard won't let me do it because something overlaps something if I point the wizard to the existing git repo.

I imported the project using Import Existing Project and pointing it to the CMakeFiles directory inside my build directory. This created the project nicely except it created a [Source directory] link to the source code, I assume that is because the source code is not under the build directory, of course.

So is the source of the problem and how should I rectify this?

Is there a better/correct way to import CMake projects into Eclipse?

The project is question is FreeCAD in case that makes a difference.
Re: Git not available for an imported CMake project [message #1752754 is a reply to message #1752344] Thu, 26 January 2017 21:24 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Can you provide detailed steps to reproduce ?
Which Eclipse installation are you using (package and version) ?
Which EGit version are you using ?
Re: Git not available for an imported CMake project [message #1752769 is a reply to message #1752754] Fri, 27 January 2017 05:06 Go to previous message
Kustaa Nyholm is currently offline Kustaa NyholmFriend
Messages: 5
Registered: January 2017
Junior Member
Hi, thanks for looking into this,I described this in my SO post,
I copy paste it from there to here, I'll paste my eclipse configuration at the end:
-------------------------

I'm trying to use Eclipse to work with FreeCAD project.

I'm following these instructions as they seem to match my situation:

http://www.mantidproject.org/Setting_up_Eclipse_projects_with_CMake

What I've done:

I checked out the FreeCAD project from Github:

https://github.com/FreeCAD

to my home folder with:

mkdir ~/FreeCAD
cd ~/FreeCAD
git clone https://github.com/FreeCAD/FreeCAD FreeCAD-git


I then created a build folder:

mkdir build
cd build

I then ran CMake like this:

cmake -G"Eclipse CDT4 - Unix Makefiles" -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE ../FreeCAD-git

In Eclipse I did 'Import Existing Project...' and pointed the import wizard to the build folder and it duly created the .cproject and .project files there.

The project displays just fine in the Package Explorer (as FreeCAD_trunk@build) but there is no '>' mark next to the project name to indicate that it is associated with a git repo.

If right click on the project and select 'Team' there are only two options in the submenu (`Apply Patch...` / `Share Project...^), a further indication that EGit has not picked up the git repo.

I the GitRepo view I can view the repo and work with it but because the project is not 'associated' with it I cannot commit or do 'anything git' with the project files.

If try '`Team/Share Project...`' and point the share project wizard to the git repo it complains:


Cannot move project FreeCAD_trunk@build to target location /Users/nyholku/FreeCAD/FreeCAD-git/FreeCAD_trunk@build, as this location overlaps with location /Users/nyholku/FreeCAD/FreeCAD-git, which contains a .project file

So I'm at loss how make EGit recognise the `/Users/nyholku/FreeCAD/FreeCAD-git/.git` repo.

-------------------------

Version: Neon (4.6)
Build id: I20160606-1100

AnyEditTools 2.6.1.201602151951 AnyEditTools.feature.group Andrey Loskutov
Arduino C++ Tools 9.2.0.201612061315 org.eclipse.cdt.arduino.feature.group Eclipse CDT
Bndtools 3.2.0.REL-20160517-162512-g3a83c33 bndtools.main.feature.feature.group Bndtools
Bytecode Outline 2.4.3 de.loskutov.BytecodeOutline.feature.feature.group Andrey Loskutov
C/C++ Autotools support 9.2.0.201612061315 org.eclipse.cdt.autotools.feature.group Eclipse CDT
C/C++ Autotools support Source 9.2.0.201612061315 org.eclipse.cdt.autotools.source.feature.group Eclipse CDT
C/C++ Berkeley UPC (Unified Parallel C) Toolchain Support 9.2.0.201612061315 org.eclipse.cdt.bupc.feature.group Eclipse CDT
C/C++ C99 LR Parser 9.2.0.201612061315 org.eclipse.cdt.core.lrparser.feature.feature.group Eclipse CDT
C/C++ C99 LR Parser SDK 9.2.0.201612061315 org.eclipse.cdt.core.lrparser.sdk.feature.group Eclipse CDT
C/C++ CMake Build Support - Experimental 9.2.0.201612061315 org.eclipse.cdt.cmake.feature.group Eclipse CDT
C/C++ Debugger Services Framework (DSF) Examples 9.2.0.201612061315 org.eclipse.cdt.examples.dsf.feature.group Eclipse CDT
C/C++ Development Tools 9.2.0.201612061315 org.eclipse.cdt.feature.group Eclipse CDT
C/C++ Development Tools SDK 9.2.0.201612061315 org.eclipse.cdt.sdk.feature.group Eclipse CDT
C/C++ Docker Container Launch Support 9.2.0.201612061315 org.eclipse.cdt.docker.launcher.feature.group Eclipse CDT
C/C++ Docker Container Launch Support Source 9.2.0.201612061315 org.eclipse.cdt.docker.launcher.source.feature.group Eclipse CDT
C/C++ GCC Cross Compiler Support 9.2.0.201612061315 org.eclipse.cdt.build.crossgcc.feature.group Eclipse CDT
C/C++ GDB Hardware Debugging 9.2.0.201612061315 org.eclipse.cdt.debug.gdbjtag.feature.group Eclipse CDT
C/C++ IBM XLC Compiler Support 9.2.0.201612061315 org.eclipse.cdt.xlc.feature.feature.group Eclipse CDT
C/C++ IBM XLC Compiler Support SDK 9.2.0.201612061315 org.eclipse.cdt.xlc.sdk.feature.group Eclipse CDT
C/C++ LLDB Debugger Integration (experimental) 1.0.0.201612061315 org.eclipse.cdt.llvm.dsf.lldb.feature.group Eclipse CDT
C/C++ LLDB Debugger Integration (experimental) Developer Resources 1.0.0.201612061315 org.eclipse.cdt.llvm.dsf.lldb.source.feature.group Eclipse CDT
C/C++ LLVM-Family Compiler Build Support 9.2.0.201612061315 org.eclipse.cdt.managedbuilder.llvm.feature.group Eclipse CDT
C/C++ Memory View Enhancements 9.2.0.201612061315 org.eclipse.cdt.debug.ui.memory.feature.group Eclipse CDT
C/C++ Memory View Enhancements Source 9.2.0.201612061315 org.eclipse.cdt.debug.ui.memory.source.feature.group Eclipse CDT
C/C++ Miscellaneous Utilities 9.2.0.201612061315 org.eclipse.cdt.util.feature.group Eclipse CDT
C/C++ Multicore Visualizer 9.2.0.201612061315 org.eclipse.cdt.gnu.multicorevisualizer.feature.group Eclipse CDT
C/C++ Qt Support - Preview 9.2.0.201612061315 org.eclipse.cdt.qt.feature.group Eclipse CDT
C/C++ Remote Launch 9.2.0.201612061315 org.eclipse.cdt.launch.remote.feature.group Eclipse CDT
C/C++ Remote Launch Source 9.2.0.201612061315 org.eclipse.cdt.launch.remote.source.feature.group Eclipse CDT
C/C++ Unit Testing Support 9.2.0.201612061315 org.eclipse.cdt.testsrunner.feature.feature.group Eclipse CDT
C/C++ Unit Testing Support Source 9.2.0.201612061315 org.eclipse.cdt.testsrunner.source.feature.feature.group Eclipse CDT
C/C++ UPC (Unified Parallel C) Support 9.2.0.201612061315 org.eclipse.cdt.core.parser.upc.feature.feature.group Eclipse CDT
C/C++ UPC (Unified Parallel C) Support SDK 9.2.0.201612061315 org.eclipse.cdt.core.parser.upc.sdk.feature.group Eclipse CDT
C/C++ Visual C++ Support 9.2.0.201612061315 org.eclipse.cdt.msw.feature.group Eclipse CDT
C/C++ Visualizer Framework 9.2.0.201612061315 org.eclipse.cdt.visualizer.feature.group Eclipse CDT
CDT Standalone Debugger Support 9.2.0.201612061315 org.eclipse.cdt.debug.standalone.feature.group Eclipse CDT
DataHierarchy 1.0.2.201505012108 DataHierarchy.feature.group Andrey Loskutov
e(fx)clipse - IDE 2.4.0.201605112122 org.eclipse.fx.ide.feature.feature.group Eclipse.org
EclEmma Java Code Coverage 2.3.3.201602231923 com.mountainminds.eclemma.feature.feature.group Mountainminds GmbH & Co. KG
Eclipse e4 Tools 4.5.100.v20160503-0947 org.eclipse.e4.core.tools.feature.feature.group Eclipse.org
Eclipse SDK 4.6.0.I20160606-1100 org.eclipse.sdk.ide Eclipse.org
Eclipse XML Editors and Tools 3.8.0.v201605120129 org.eclipse.wst.xml_ui.feature.feature.group Eclipse Web Tools Platform
EMF - Eclipse Modeling Framework SDK 2.12.0.v20160526-0356 org.eclipse.emf.sdk.feature.group Eclipse Modeling Project
FileSync 1.3.9.201406241900 FileSync.feature.group Andrey Loskutov
FindBugs Feature 3.0.2.20160306-90c514b edu.umd.cs.findbugs.plugin.eclipse.feature.group FindBugs Project
Git integration for Eclipse 4.6.0.201612231935-r org.eclipse.egit.feature.group Eclipse EGit
Git integration for Eclipse - Source Code 4.6.0.201612231935-r org.eclipse.egit.source.feature.group Eclipse EGit
Git integration for Eclipse - Task focused interface 4.6.0.201612231935-r org.eclipse.egit.mylyn.feature.group Eclipse EGit
Java implementation of Git 4.6.0.201612231935-r org.eclipse.jgit.feature.group Eclipse JGit
Java implementation of Git - Command Line Interface 4.6.0.201612231935-r org.eclipse.jgit.pgm.feature.group Eclipse JGit
Java implementation of Git - Command Line Interface - Source Code 4.6.0.201612231935-r org.eclipse.jgit.pgm.source.feature.group Eclipse JGit
Java implementation of Git - optional Http support using Apache httpclient 4.6.0.201612231935-r org.eclipse.jgit.http.apache.feature.group Eclipse JGit
Java implementation of Git - optional LFS support 4.6.0.201612231935-r org.eclipse.jgit.lfs.feature.group Eclipse JGit
Java implementation of Git - Source Code 4.6.0.201612231935-r org.eclipse.jgit.source.feature.group Eclipse JGit
JDepend4Eclipse 1.2.4.201406241900 JDepend4Eclipse.feature.group Andrey Loskutov
m2e - Maven Integration for Eclipse (includes Incubating components) 1.7.0.20160603-1933 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e
MWE 2 language SDK 2.9.0.v201605261103 org.eclipse.emf.mwe2.language.sdk.feature.group Eclipse Xtext
MWE 2 runtime SDK 2.9.0.v201605261103 org.eclipse.emf.mwe2.runtime.sdk.feature.group Eclipse Xtext
PyDev for Eclipse 5.4.0.201611281236 org.python.pydev.feature.feature.group Fabio Zadrozny
PyDev for Eclipse Developer Resources 5.4.0.201611281236 org.python.pydev.feature.source.feature.group Fabio Zadrozny
Remote CDT Services 9.2.0.201612061315 org.eclipse.cdt.remote.feature.group Eclipse CDT
Subclipse (Required) 1.8.20 org.tigris.subversion.subclipse.feature.group tigris.org
Subversion Client Adapter (Required) 1.8.4 org.tigris.subversion.clientadapter.feature.feature.group tigris.org
SVNKit Client Adapter (Not required) 1.7.9.1 org.tigris.subversion.clientadapter.svnkit.feature.feature.group tigris.org
Xtext Complete SDK 2.10.0.v201605250459 org.eclipse.xtext.sdk.feature.group Eclipse Xtext
ZipEditor 1.1.1.201303181845 zipeditor.feature.group Uwe Voigt
Previous Topic:Tracking the deletion of remote branches?
Next Topic:How implement create a shallow clone of specified depth
Goto Forum:
  


Current Time: Thu Apr 25 13:12:25 GMT 2024

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

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

Back to the top