MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0015068 | CMake | CMake | public | 2014-08-07 10:44 | 2015-06-01 08:38 |
|
Reporter | A. Klitzing | |
Assigned To | Brad King | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | mingw | OS | Windows | OS Version | 7 |
Product Version | | |
Target Version | CMake 3.1.1 | Fixed in Version | CMake 3.1.1 | |
|
Summary | 0015068: Eclipse cannot run Makefile (mingw) |
Description | Since cmake 3.0 we cannot build from eclipse (tried Kepler and Luna). We uses the "eclipse cdt4 mingw"-generator on windows to create the projects. After import in eclipse there will be no reaction if we try to run the build or a special target of the Makefile.
The same workflow works with cmake 2.8.x flawlessly.
The build with cmake 3 works without problems if we use the terminal and run it manually with "mingw32-make". |
Steps To Reproduce | 1. Take your project
2. Run cmake-gui and configure the project
3. Select "eclipse cdt4 mingw" generator
4. Import from "existing project" in eclipse
5. Select "build all" or double click on a special target
6. Eclipse does nothing
Expected:
Run the makefile |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 0001-Add-org.eclipse.cdt.core.cnature-to-CXX-projects.patch (797) 2014-09-26 08:45 https://public.kitware.com/Bug/file/5262/0001-Add-org.eclipse.cdt.core.cnature-to-CXX-projects.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2014-08-07 10:44 | A. Klitzing | New Issue | |
2014-08-07 10:56 | Brad King | Assigned To | => Alex Neundorf |
2014-08-07 10:56 | Brad King | Status | new => assigned |
2014-08-12 14:47 | Brad King | Note Added: 0036606 | |
2014-09-26 07:28 | A. Klitzing | Note Added: 0036864 | |
2014-09-26 08:30 | A. Klitzing | Note Added: 0036865 | |
2014-09-26 08:35 | A. Klitzing | Note Edited: 0036865 | bug_revision_view_page.php?bugnote_id=36865#r1580 |
2014-09-26 08:45 | A. Klitzing | File Added: 0001-Add-org.eclipse.cdt.core.cnature-to-CXX-projects.patch | |
2014-09-26 08:45 | A. Klitzing | Note Edited: 0036865 | bug_revision_view_page.php?bugnote_id=36865#r1581 |
2015-01-15 17:45 | A. Klitzing | Note Added: 0037708 | |
2015-01-16 09:02 | Brad King | Note Added: 0037710 | |
2015-01-16 09:03 | Brad King | Note Added: 0037711 | |
2015-01-16 09:03 | Brad King | Assigned To | Alex Neundorf => Brad King |
2015-01-16 09:03 | Brad King | Status | assigned => resolved |
2015-01-16 09:03 | Brad King | Resolution | open => fixed |
2015-01-16 09:03 | Brad King | Fixed in Version | => CMake 3.1.1 |
2015-01-16 09:03 | Brad King | Target Version | => CMake 3.1.1 |
2015-06-01 08:38 | Robert Maynard | Note Added: 0038839 | |
2015-06-01 08:38 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0036606)
|
Brad King
|
2014-08-12 14:47
|
|
I cannot reproduce this with CMake 3.0.0 or 2.8.12.2 and:
Eclipse IDE for C/C++ Developers
Version: Luna Release (4.4.0)
"Build All" always works the first time. After that it does nothing. If I remove build outputs by hand then "Build All" still does nothing, but if I refresh with "F5" then it works.
I observe no difference between CMake 2.8.12 and 3.0 versions. |
|
|
(0036864)
|
A. Klitzing
|
2014-09-26 07:28
|
|
Ok, we looked into it and found a hint for it.
If we create the project with cmake 3.0 it will create a .project with following "natures".
<natures>
<nature>org.eclipse.cdt.make.core.makeNature</nature>
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
</natures>
If we create the project with cmake 2.8 we have the following natures.
<natures>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.make.core.makeNature</nature>
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
</natures>
So if we copy the nature block from 2.8 .project file to 3.0 .project file we are able to run make with eclipse again. |
|
|
(0036865)
|
A. Klitzing
|
2014-09-26 08:30
(edited on: 2014-09-26 08:45) |
|
Commit 51726cce64ee8bce1115f3c6d092b4ae6f43d714 seems to be the "problem". Since we added CXX in PROJECT only it won't create a cnature.
If we use CXX and C in PROJECT it will create a working .project. But of course cmake will search for a C compiler that we don't need.
We tried ECLIPSE_EXTRA_NATURES... but had no luck with it.
We created a new/empty C++ project with eclipse and looked into .project. Eclipse itself adds cnature and ccnature to it.
Attached a patch that will fix .project creation.
|
|
|
(0037708)
|
A. Klitzing
|
2015-01-15 17:45
|
|
|
|
(0037710)
|
Brad King
|
2015-01-16 09:02
|
|
|
|
(0037711)
|
Brad King
|
2015-01-16 09:03
|
|
I've queued this for 3.1.1 since it is a regression fix.
|
|
|
(0038839)
|
Robert Maynard
|
2015-06-01 08:38
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|