Open ceggers-arri opened 11 months ago
Your .cproject has been created with cmake4eclipse prior to 4.x. Re-creating it as a Cmake4eclipse Managed Build project using the New C/C++-Project wizard should fix the issue. As a side effect, you will also get rid of all the confusing project property pages that have no effect when using cmake.
Your .cproject has been created with cmake4eclipse prior to 4.x.
Not really. Yes, the I am working on an existing code base, but the Eclipse projects have been re-created from scratch (as described above). I deleted all .project
, .cproject
and .setting/*
files in advance. But I think I didn't use the C/C++-Project wizard.
While setting buildDir=_build/Debug
manually in .cproject
, everything seemed to work ... until I updated Eclipse from 2023-09 to 2023-12. Now I get some other error message when starting a build. In the Builder Settings tab I can see that the build directory is now "/project/Debug" instead of "/project/_builds/Debug". Changes in the Build output location are now ignored.
In order to continue my actual work, I downgraded back to Eclipse 2023-09.
Re-creating it as a Cmake4eclipse Managed Build project using the New C/C++-Project wizard should fix the issue. As a side effect, you will also get rid of all the confusing project property pages that have no effect when using cmake.
It looks like the problem is also present here. I only needed to add another build configuration, set my CMake variables and restart Eclipse. Again I have an empty buildDir
.
While setting
buildDir=_build/Debug
manually in.cproject
, everything seemed to work ... until I updated Eclipse from 2023-09 to 2023-12. Now I get some other error message when starting a build. In the Builder Settings tab I can see that the build directory is now "/project/Debug" instead of "/project/_builds/Debug". Changes in the Build output location are now ignored.
If it is now "/project/Debug" instead of "/project/_builds/Debug" then the plain old managed build kicked in. This may be caused because cmake4eclipse is not compatible with CDT 11.4: See #198
Describe the bug Build does not start, caused by an invalid (empty) build directory (see 1st screenshot below).
It is not clear for me, whether a (Cmake4eclipse) build directory has to be specified explicitly, as a useful build directory is chosen automatically by default (e.g. _build/Default). But after setting CMake cache entries, an empty
buildDir
value is written to.cproject
(see below). After restarting the Eclipse IDE (the wrongbuildDir
setting does not take effect immediately), the project cannot be built anymore.To Reproduce Steps to reproduce the behavior:
Expected behavior Project can be build even after restarting the Eclipse IDE.
Screenshots Error message after starting a build Wrong build directory (configuration where a CMake cache variable has been set) Empty build directory (configuration where a CMake cache variable has been set) Correct build directory (configuration where NO CMake cache variable has been set) Empty build directory (configuration where NO CMake cache variable has been set)
Useful Information
What is in Eclipse's Error Log?
Sanitized stack traces:
Additional context .cproject snipset of the build configuration, where a CMake cache variable has been set
.cproject snipset of the build configuration, where NO CMake cache variable has been set