[cmake-developers] Experiments in CMake support for Clang (header & standard) modules

Stephen Kelly steveire at gmail.com
Mon Aug 6 17:36:59 EDT 2018


Stephen Kelly wrote:
>> The build.sh script shows the commands required to build it (though I
>> haven't checked the exact fmodule-file dependencies to check that they're
>> all necessary, etc) - and with current Clang top-of-tree it does build
>> and run the example dinnerparty program.
> 
> Ok. I tried with my several-weeks-old checkout and it failed on the first
> command with -modules-ts in it (for AbstractFruit.cppm - the simplest
> one).
> 
> I'll update my build and try again, but that will take some time.

I have locally tried your modifications. Aside from the content of my 
previous email, I updated my clone (force push) to clean up the commits, and 
to modify your build.sh script to maintain the different libraries in the 
repo.

 https://github.com/steveire/ModulesExperiments/commits/master

I am still interested in what the C++ code (and build.sh) look like in the 
case of one-module-per-library. 

It is obvious from looking at build.sh as it is that the buildsystem needs 
to be changed when adding a new import to a c++ file, as I have described. 
see the commit adding Grape separately and the changes required to the 
buildsystem which were not required in the non-modules world:

 https://github.com/steveire/ModulesExperiments/commit/428bea53fc6

I will see if I can get a recent GCC build for comparison and to determine 
whether the callback-to-the-buildsystem used in GCC makes a difference in 
that respect.

I'm still interested in a response to my previous email in that respect.

Thanks,

Stephen.




More information about the cmake-developers mailing list