[Scons-users] Ninja generator, compilation database issues
Mats Wichmann
mats at wichmann.us
Fri Aug 30 09:39:27 EDT 2024
On 8/30/24 02:38, Jelic, Nikola wrote:
> Greetings,
>
> We are using SCons' Ninja generator to upgrade the existing project. We
> are also using the compilation database extension in SCons, but we have
> reached some interesting limitations when we try to use Ninja generator.
> In short, if "compile_commands.json" is requested to be anywhere except
> the root of the project (which is not our case), we face one or all of
> these issues:
>
> *
> Duplicate Ninja targets
> *
> A hanging task for generating the compilation database on a
> different location
>
> I have a small WIP patch that resolves some of these issues, but I
> wanted to start a discussion and see what the best approach would be.
Can continue discussion here, open an issue (or discussion) on GitHub,
or even discuss on the Discord channel.
> The location and the name of the compilation database file should be
> completely independent of the project structure
There shouldn't be, and I don't at a quick glance see any reason in the
code for why putting the database somewhere else would not work. I do
note that the test suite only checks names in the project topdir, and in
a variant directory (which "looks like" in the topdir although it's
relocated).
We don't have anything that tests the compilation DB and ninja together.
More information about the Scons-users
mailing list