[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Are managed projects a requirement/recommendation or the new build system is enough?
|
On Dienstag, 8. Dezember 2020 01:56:05 CET Liviu Ionescu wrote:
> I did not get to study the new CDT build support (yet), but I was surprised
> to see that cmake4eclipse creates a kind of managed build projects, while
> the CDT cmake plug-ins do not.
cmake4eclipse does not create a MBS project, it hooks in to MBS as a
buildscript-generator (plus the indexer support, but that's a different
story).
- MBS gives its users tons of configuration options for the project to
configure build-script generation. With cmake, the options are useless/
confusing to users since cmake takes the CMakeLists.txt as the source of
truth.
- MBS is targeted to build only a single artifact (static-library, shared-lib
or executable) per project. Each of the source files gets the same set of
arguments to compile. Cmake can build multiple artefacts at once, each source
file can have different compiler options to compile.
> For the future developments that I'm planning for the Embedded CDT plug-ins,
> I don't need the full managed build features, but I would need support for
> multiple build configurations, and a way to configure the indexer to parse
> separate compile_commands.json files for those configurations.
The compile_commands.json parser has no stable API yet, but the API has been
simplified recently. In general, you now give it the file to parse and
'technical' objects to run the compiler-built-ins detection:
org.eclipse.cdt.cmake.is.core.ParseRequest.ParseRequest(IFile,
IIndexerInfoConsumer, ICommandLauncher, IConsole)
See how the API is used:
org.eclipse.cdt.cmake.core.internal.CMakeBuildConfiguration.processCompileCommandsFile(IConsole,
IProgressMonitor)
There is also a bugzilla for diskussion of the API. Unfortunately I cannot
find it any more.
Martin
--
Cd wrttn wtht vwls s mch trsr.