Date: Thu, 13 Oct 2022 22:58:33 +0000
*
* CMake runs the scan during the build. They have to know about all possible BMIs during configuration.
I wonder if they can run the scan just before generation of the build definition, since by that point there is a good amount of information to have a good over approximation of the dependency set.
-- Gaby
From: Michael Spencer <bigcheesegs_at_[hidden]>
Sent: Thursday, October 13, 2022 2:05 PM
To: sg15_at_[hidden]
Cc: Ben Boeckel <ben.boeckel_at_[hidden]>; Gabriel Dos Reis <gdr_at_[hidden]>
Subject: Re: [SG15] Header units again.
On Thu, Oct 13, 2022 at 12:37 PM Gabriel Dos Reis via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:
> Yes, but we can't then add a rule to `build.ninja` to say "hey, make a
> BMI of this header file no one knew about until we started building
> stuff".
I suppose that raises the question: at what point do you run the dependency scanner? During build?
-- Gaby
CMake runs the scan during the build. They have to know about all possible BMIs during configuration.
- Michael Spencer
-----Original Message-----
From: Ben Boeckel <ben.boeckel_at_[hidden]<mailto:ben.boeckel_at_[hidden]>>
Sent: Thursday, October 13, 2022 12:34 PM
To: Gabriel Dos Reis <gdr_at_[hidden]<mailto:gdr_at_[hidden]>>
Cc: sg15_at_[hidden]<mailto:sg15_at_[hidden]>
Subject: Re: [SG15] Header units again.
On Thu, Oct 13, 2022 at 19:02:19 +0000, Gabriel Dos Reis wrote:
> > While fine, that is discovered far too late for CMake to do much of
> > anything about (as the build graph is already made at this point and is
> > static in Ninja generators; Makefiles is more flexible, but needs
> > serious synchronization to avoid duplicate rule generation).
>
> What do you mean by "too late"? If a source file (.h or .cpp) says
> "import <some-header>;", that shows up in the output of the dependency
> scanner, doesn't it?
Yes, but we can't then add a rule to `build.ninja` to say "hey, make a
BMI of this header file no one knew about until we started building
stuff".
--Ben
_______________________________________________
SG15 mailing list
SG15_at_[hidden]<mailto:SG15_at_[hidden]>
https://lists.isocpp.org/mailman/listinfo.cgi/sg15<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fsg15&data=05%7C01%7Cgdr%40microsoft.com%7Cec70e27ba878450e277a08daad5eae01%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638012919517786931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=pZmJupuYfzQbC7yaQYEDO%2F2OFv%2FoygU12gFd28GnmjU%3D&reserved=0>
* CMake runs the scan during the build. They have to know about all possible BMIs during configuration.
I wonder if they can run the scan just before generation of the build definition, since by that point there is a good amount of information to have a good over approximation of the dependency set.
-- Gaby
From: Michael Spencer <bigcheesegs_at_[hidden]>
Sent: Thursday, October 13, 2022 2:05 PM
To: sg15_at_[hidden]
Cc: Ben Boeckel <ben.boeckel_at_[hidden]>; Gabriel Dos Reis <gdr_at_[hidden]>
Subject: Re: [SG15] Header units again.
On Thu, Oct 13, 2022 at 12:37 PM Gabriel Dos Reis via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:
> Yes, but we can't then add a rule to `build.ninja` to say "hey, make a
> BMI of this header file no one knew about until we started building
> stuff".
I suppose that raises the question: at what point do you run the dependency scanner? During build?
-- Gaby
CMake runs the scan during the build. They have to know about all possible BMIs during configuration.
- Michael Spencer
-----Original Message-----
From: Ben Boeckel <ben.boeckel_at_[hidden]<mailto:ben.boeckel_at_[hidden]>>
Sent: Thursday, October 13, 2022 12:34 PM
To: Gabriel Dos Reis <gdr_at_[hidden]<mailto:gdr_at_[hidden]>>
Cc: sg15_at_[hidden]<mailto:sg15_at_[hidden]>
Subject: Re: [SG15] Header units again.
On Thu, Oct 13, 2022 at 19:02:19 +0000, Gabriel Dos Reis wrote:
> > While fine, that is discovered far too late for CMake to do much of
> > anything about (as the build graph is already made at this point and is
> > static in Ninja generators; Makefiles is more flexible, but needs
> > serious synchronization to avoid duplicate rule generation).
>
> What do you mean by "too late"? If a source file (.h or .cpp) says
> "import <some-header>;", that shows up in the output of the dependency
> scanner, doesn't it?
Yes, but we can't then add a rule to `build.ninja` to say "hey, make a
BMI of this header file no one knew about until we started building
stuff".
--Ben
_______________________________________________
SG15 mailing list
SG15_at_[hidden]<mailto:SG15_at_[hidden]>
https://lists.isocpp.org/mailman/listinfo.cgi/sg15<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fsg15&data=05%7C01%7Cgdr%40microsoft.com%7Cec70e27ba878450e277a08daad5eae01%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638012919517786931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=pZmJupuYfzQbC7yaQYEDO%2F2OFv%2FoygU12gFd28GnmjU%3D&reserved=0>
Received on 2022-10-13 22:58:36